Bug 1240800: When we've reallocated our buffer client side and fail to track the proper invalid region always upload the bounds of the visible region. r=mattwoodrow draft
authorBas Schouten <bschouten@mozilla.com>
Mon, 08 Feb 2016 15:36:07 +0100
changeset 329562 b37150b472dbe219f4cd46d8d5b20a23a0c76866
parent 329513 c3ac85cea6a3d324bf118ef75e20d0bb004838b4
child 513976 a9c72e5d6a1556e0c0246534a76126b5fac9b29f
push id10544
push userbschouten@mozilla.com
push dateMon, 08 Feb 2016 14:36:25 +0000
reviewersmattwoodrow
bugs1240800
milestone47.0a1
Bug 1240800: When we've reallocated our buffer client side and fail to track the proper invalid region always upload the bounds of the visible region. r=mattwoodrow
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -347,17 +347,17 @@ ContentClientRemoteBuffer::GetUpdatedReg
   if (mIsNewBuffer || aDidSelfCopy) {
     // A buffer reallocation clears both buffers. The front buffer has all the
     // content by now, but the back buffer is still clear. Here, in effect, we
     // are saying to copy all of the pixels of the front buffer to the back.
     // Also when we self-copied in the buffer, the buffer space
     // changes and some changed buffer content isn't reflected in the
     // draw or invalidate region (on purpose!).  When this happens, we
     // need to read back the entire buffer too.
-    updatedRegion = aVisibleRegion;
+    updatedRegion = aVisibleRegion.GetBounds();
     mIsNewBuffer = false;
   } else {
     updatedRegion = aRegionToDraw;
   }
 
   NS_ASSERTION(BufferRect().Contains(aRegionToDraw.GetBounds()),
                "Update outside of buffer rect!");
   MOZ_ASSERT(mTextureClient, "should have a back buffer by now");