Bug 1491442 - Remove call to ReadBuffer. r=jgilbert
authorMarkus Stange <mstange@themasta.com>
Fri, 16 Aug 2019 01:16:23 +0000
changeset 488417 0822612163d60c8c8deb17f0ab5c59de79b05a66
parent 488416 ae86a277bd72b7a3c9b5e2ae40fcb74c33b796da
child 488418 03a1e5d857b555b7f400a94ca904786cba968c50
push id36443
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 09:48:15 +0000
treeherdermozilla-central@5d4cbfe103bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1491442
milestone70.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 1491442 - Remove call to ReadBuffer. r=jgilbert There's no other caller that sets ReadBuffer to anything else, and GL_BACK is the default for default framebuffers. Furthermore, this call triggers GL_INVALID_OPERATION errors when called on a non-default framebuffer. Differential Revision: https://phabricator.services.mozilla.com/D40551
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1818,22 +1818,16 @@ void CompositorOGL::CopyToTarget(DrawTar
   GLint width = rect.Width();
   GLint height = rect.Height();
 
   if ((int64_t(width) * int64_t(height) * int64_t(4)) > INT32_MAX) {
     NS_ERROR("Widget size too big - integer overflow!");
     return;
   }
 
-  if (!mGLContext->IsGLES()) {
-    // GLES2 promises that binding to any custom FBO will attach
-    // to GL_COLOR_ATTACHMENT0 attachment point.
-    mGLContext->fReadBuffer(LOCAL_GL_BACK);
-  }
-
   RefPtr<DataSourceSurface> source = Factory::CreateDataSourceSurface(
       rect.Size(), gfx::SurfaceFormat::B8G8R8A8);
   if (NS_WARN_IF(!source)) {
     return;
   }
 
   ReadPixelsIntoDataSurface(mGLContext, source);