mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 742544 - Don't change global shared context multiple times. r=jgilbert
This commit is contained in:
parent
03d6a03364
commit
e5ee1d5354
@ -1393,7 +1393,7 @@ GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget)
|
||||
// Create dummy GLContextEGL class
|
||||
nsRefPtr<GLContextEGL> glContext =
|
||||
new GLContextEGL(ContextFormat(DepthToGLFormat(context->device()->depth())),
|
||||
NULL,
|
||||
gGlobalContext,
|
||||
NULL,
|
||||
sEGLLibrary.fGetCurrentSurface(LOCAL_EGL_DRAW), // just use same surface for read and draw
|
||||
sEGLLibrary.fGetCurrentContext(),
|
||||
@ -1405,7 +1405,9 @@ GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget)
|
||||
glContext->SetIsDoubleBuffered(context->format().doubleBuffer());
|
||||
|
||||
glContext->SetPlatformContext(context);
|
||||
gGlobalContext = glContext;
|
||||
if (!gGlobalContext) {
|
||||
gGlobalContext = glContext;
|
||||
}
|
||||
|
||||
return glContext.forget();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user