Bug 1378474 - part 1 - centralize AvailableRunnable dispatching; r=jgilbert

This change will make labeling AvailableRunnable simpler, as we'll only
have to modify one location.
This commit is contained in:
Nathan Froyd 2017-08-23 10:39:40 -04:00
Родитель dfc22964d2
Коммит f3703c9934
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -61,6 +61,12 @@ WebGLQuery::Delete()
LinkedListElement<WebGLQuery>::removeFrom(mContext->mQueries); LinkedListElement<WebGLQuery>::removeFrom(mContext->mQueries);
} }
static void
DispatchAvailableRunnable(WebGLQuery* query)
{
NS_DispatchToCurrentThread(new AvailableRunnable(query));
}
//// ////
static GLenum static GLenum
@ -126,7 +132,7 @@ WebGLQuery::EndQuery()
//// ////
NS_DispatchToCurrentThread(new AvailableRunnable(this)); DispatchAvailableRunnable(this);
} }
void void
@ -254,7 +260,7 @@ WebGLQuery::QueryCounter(const char* funcName, GLenum target)
gl->MakeCurrent(); gl->MakeCurrent();
gl->fQueryCounter(mGLName, mTarget); gl->fQueryCounter(mGLName, mTarget);
NS_DispatchToCurrentThread(new AvailableRunnable(this)); DispatchAvailableRunnable(this);
} }
//// ////