Backed out changeset 717b4a7cc264 (bug 1646135) as requested by rmader for causing a regression.
authorBrindusan Cristian <cbrindusan@mozilla.com>
Fri, 25 Jun 2021 18:19:50 +0300
changeset 584434 b434222eaaf2c6c880fe92adbbba7bf2a50e57ab
parent 584433 59bc043e393b943e80240d26d505234b2051eeea
child 584435 c2191ee9cb6519c9736108ee1c82599a533ef552
push id38565
push usermlaza@mozilla.com
push dateFri, 25 Jun 2021 21:51:52 +0000
treeherdermozilla-central@b9a82200b994 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1646135
milestone91.0a1
backs out717b4a7cc264da60ec2b661451516d8468707992
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
Backed out changeset 717b4a7cc264 (bug 1646135) as requested by rmader for causing a regression. CLOSED TREE
gfx/webrender_bindings/RenderCompositorEGL.cpp
--- a/gfx/webrender_bindings/RenderCompositorEGL.cpp
+++ b/gfx/webrender_bindings/RenderCompositorEGL.cpp
@@ -197,28 +197,18 @@ bool RenderCompositorEGL::Resume() {
 
 bool RenderCompositorEGL::IsPaused() { return mEGLSurface == EGL_NO_SURFACE; }
 
 gl::GLContext* RenderCompositorEGL::gl() const {
   return RenderThread::Get()->SingletonGL();
 }
 
 bool RenderCompositorEGL::MakeCurrent() {
-  const auto& gle = gl::GLContextEGL::Cast(gl());
-
-  gle->SetEGLSurfaceOverride(mEGLSurface);
-  bool ok = gl()->MakeCurrent();
-  if ((kIsWayland || kIsX11) && ok && mEGLSurface != EGL_NO_SURFACE) {
-    // If we successfully made a surface current, set the draw buffer
-    // appropriately. It's not well-defined by the EGL spec whether
-    // eglMakeCurrent should do this automatically. See bug 1646135.
-    gl()->fDrawBuffer(gl()->IsDoubleBuffered() ? LOCAL_GL_BACK
-                                               : LOCAL_GL_FRONT);
-  }
-  return ok;
+  gl::GLContextEGL::Cast(gl())->SetEGLSurfaceOverride(mEGLSurface);
+  return gl()->MakeCurrent();
 }
 
 void RenderCompositorEGL::DestroyEGLSurface() {
   const auto& gle = gl::GLContextEGL::Cast(gl());
   const auto& egl = gle->mEgl;
 
   // Release EGLSurface of back buffer before calling ResizeBuffers().
   if (mEGLSurface) {