mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1059793 - Mark the compositor's gl context destroyed before the widget is gone. r=jgilbert
This commit is contained in:
parent
ae9a45a6fd
commit
d9c2fd4a31
@ -2641,6 +2641,9 @@ protected:
|
||||
public:
|
||||
virtual ~GLContext();
|
||||
|
||||
// Mark this context as destroyed. This will nullptr out all
|
||||
// the GL function pointers!
|
||||
void MarkDestroyed();
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Everything that isn't standard GL APIs
|
||||
@ -2683,10 +2686,6 @@ public:
|
||||
|
||||
virtual void ReleaseSurface() {}
|
||||
|
||||
// Mark this context as destroyed. This will nullptr out all
|
||||
// the GL function pointers!
|
||||
void MarkDestroyed();
|
||||
|
||||
bool IsDestroyed() {
|
||||
// MarkDestroyed will mark all these as null.
|
||||
return mSymbols.fUseProgram == nullptr;
|
||||
|
@ -173,6 +173,13 @@ CompositorOGL::CleanupResources()
|
||||
mQuadVBO = 0;
|
||||
}
|
||||
|
||||
// On the main thread the Widget will be destroyed soon and calling MakeCurrent
|
||||
// after that could cause a crash (at least with GLX, see bug 1059793), unless
|
||||
// context is marked as destroyed.
|
||||
// There may be some textures still alive that will try to call MakeCurrent on
|
||||
// the context so let's make sure it is marked destroyed now.
|
||||
mGLContext->MarkDestroyed();
|
||||
|
||||
mGLContext = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user