Bug 1560736 - MakeCurrent after GeckoSurfaceTexture::DestroyUnused. r=snorp

Seems like GeckoSurfaceTexture::DestroyUnused can change the current
context.

Differential Revision: https://phabricator.services.mozilla.com/D36685

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Gilbert 2019-07-03 14:15:17 +00:00
parent 043855ab8e
commit c01f565a55
2 changed files with 2 additions and 0 deletions

View File

@ -786,6 +786,7 @@ void CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
#ifdef MOZ_WIDGET_ANDROID
java::GeckoSurfaceTexture::DestroyUnused((int64_t)mGLContext.get());
mGLContext->MakeCurrent(); // DestroyUnused can change the current context!
#endif
// Default blend function implements "OVER"

View File

@ -94,6 +94,7 @@ bool RenderCompositorEGL::BeginFrame() {
#ifdef MOZ_WIDGET_ANDROID
java::GeckoSurfaceTexture::DestroyUnused((int64_t)gl());
gl()->MakeCurrent(); // DestroyUnused can change the current context!
#endif
return true;