зеркало из https://github.com/mozilla/gecko-dev.git
Bug 989349 - part 2 - eliminate static constructor in GLContextProviderGLX.cpp; r=bjacob
This commit is contained in:
Родитель
781fda6642
Коммит
d341118272
|
@ -1190,14 +1190,20 @@ GLContextProviderGLX::CreateOffscreen(const gfxIntSize& size,
|
|||
}
|
||||
|
||||
static StaticRefPtr<GLContext> gGlobalContext;
|
||||
// TODO move that out of static initializaion
|
||||
static bool gUseContextSharing = getenv("MOZ_DISABLE_CONTEXT_SHARING_GLX") == 0;
|
||||
|
||||
GLContext*
|
||||
GLContextProviderGLX::GetGlobalContext()
|
||||
{
|
||||
static bool checkedContextSharing = false;
|
||||
static bool useContextSharing = false;
|
||||
|
||||
if (!checkedContextSharing) {
|
||||
useContextSharing = getenv("MOZ_DISABLE_CONTEXT_SHARING_GLX") == 0;
|
||||
checkedContextSharing = true;
|
||||
}
|
||||
|
||||
// TODO: get GLX context sharing to work well with multiple threads
|
||||
if (!gUseContextSharing) {
|
||||
if (!useContextSharing) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче