Bug 1605906 - Add Pause/Resume handling to CompositorOGL for Wayland r=aosmond
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 25 Dec 2019 12:01:54 +0000
changeset 508383 f8748c266e9a2ca06056300a3013f1de0b2ebd1b
parent 508382 5f223bcdf893a14d8ecdec81e5c879f2f1ab058e
child 508384 ca49196116bbeff33885ddb142d73c66a0b92da4
push id103938
push usersikeda.birchill@mozilla.com
push dateWed, 25 Dec 2019 12:14:14 +0000
treeherderautoland@f8748c266e9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond
bugs1605906
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1605906 - Add Pause/Resume handling to CompositorOGL for Wayland r=aosmond Differential Revision: https://phabricator.services.mozilla.com/D58210
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -2143,21 +2143,25 @@ void CompositorOGL::CopyToTarget(DrawTar
 void CompositorOGL::Pause() {
 #ifdef MOZ_WIDGET_ANDROID
   if (!gl() || gl()->IsDestroyed()) return;
   gl()->MakeCurrent();
   java::GeckoSurfaceTexture::DestroyUnused((int64_t)mGLContext.get());
   java::GeckoSurfaceTexture::DetachAllFromGLContext((int64_t)mGLContext.get());
   // ReleaseSurface internally calls MakeCurrent
   gl()->ReleaseSurface();
+#elif defined(MOZ_WAYLAND)
+  // ReleaseSurface internally calls MakeCurrent
+  gl()->ReleaseSurface();
 #endif
 }
 
 bool CompositorOGL::Resume() {
-#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
+#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) || \
+    defined(MOZ_WAYLAND)
   if (!gl() || gl()->IsDestroyed()) return false;
 
   // RenewSurface internally calls MakeCurrent.
   return gl()->RenewSurface(GetWidget());
 #endif
   return true;
 }