Backed out changeset 9d0676755cf8 (bug 1285692)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 19 Jul 2016 14:16:01 +0200
changeset 389607 2761e5c7898518948d18d155163bbba044328cfe
parent 389606 c1b834b45a99229bf35b21d58e2c8056e3fb0b13
child 389608 88528d5b8d961a7ff3649f8bfd5c1184faec90ae
push id23471
push userbmo:tchiovoloni@mozilla.com
push dateTue, 19 Jul 2016 18:52:45 +0000
bugs1285692
milestone50.0a1
backs out9d0676755cf83ade1bfcc75e968da5e3454efd74
Backed out changeset 9d0676755cf8 (bug 1285692)
gfx/gl/GLScreenBuffer.cpp
--- a/gfx/gl/GLScreenBuffer.cpp
+++ b/gfx/gl/GLScreenBuffer.cpp
@@ -940,30 +940,19 @@ ReadBuffer::Create(GLContext* gl,
     gl->AttachBuffersToFB(colorTex, colorRB, depthRB, stencilRB, fb, target);
     gl->mFBOMapping[fb] = surf;
 
     UniquePtr<ReadBuffer> ret( new ReadBuffer(gl, fb, depthRB,
                                               stencilRB, surf) );
 
     GLenum err = localError.GetError();
     MOZ_ASSERT_IF(err != LOCAL_GL_NO_ERROR, err == LOCAL_GL_OUT_OF_MEMORY);
-    if (err)
-        return nullptr;
-
-    const bool needsAcquire = !surf->IsProducerAcquired();
-    if (needsAcquire) {
-        surf->ProducerAcquire();
+    if (err || !gl->IsFramebufferComplete(fb)) {
+        ret = nullptr;
     }
-    const bool isComplete = gl->IsFramebufferComplete(fb);
-    if (needsAcquire) {
-        surf->ProducerRelease();
-    }
-
-    if (!isComplete)
-        return nullptr;
 
     return Move(ret);
 }
 
 ReadBuffer::~ReadBuffer()
 {
     if (!mGL->MakeCurrent())
         return;