Bug 1127289 - Add missing synchronization in TiledContentClient with DrawTargetTiled. r=sotaro
☠☠ backed out by 73b3c1c8d3d9 ☠ ☠
authorNicolas Silva <nsilva@mozilla.com>
Mon, 02 Feb 2015 15:30:55 +0100
changeset 227006 a1d913968a8a0a73a2b78b1a576f9462ccc77458
parent 227005 31c0fd2b6e8dddbc2c2f61bef7c511e843e64274
child 227007 5a4b3f3a0bc3d4a96e9b1b7a822be884e35dfa09
push id54984
push usernsilva@mozilla.com
push dateMon, 02 Feb 2015 14:31:07 +0000
treeherdermozilla-inbound@a1d913968a8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1127289
milestone38.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 1127289 - Add missing synchronization in TiledContentClient with DrawTargetTiled. r=sotaro
gfx/layers/client/TiledContentClient.cpp
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -1061,19 +1061,21 @@ ClientTiledLayerBuffer::PostValidate(con
 }
 
 void
 ClientTiledLayerBuffer::UnlockTile(TileClient aTile)
 {
   // We locked the back buffer, and flipped so we now need to unlock the front
   if (aTile.mFrontBuffer && aTile.mFrontBuffer->IsLocked()) {
     aTile.mFrontBuffer->Unlock();
+    aTile.mFrontBuffer->SyncWithObject(mCompositableClient->GetForwarder()->GetSyncObject());
   }
   if (aTile.mFrontBufferOnWhite && aTile.mFrontBufferOnWhite->IsLocked()) {
     aTile.mFrontBufferOnWhite->Unlock();
+    aTile.mFrontBufferOnWhite->SyncWithObject(mCompositableClient->GetForwarder()->GetSyncObject());
   }
   if (aTile.mBackBuffer && aTile.mBackBuffer->IsLocked()) {
     aTile.mBackBuffer->Unlock();
   }
   if (aTile.mBackBufferOnWhite && aTile.mBackBufferOnWhite->IsLocked()) {
     aTile.mBackBufferOnWhite->Unlock();
   }
 }
@@ -1283,18 +1285,16 @@ ClientTiledLayerBuffer::ValidateTile(Til
   nsIntRegion tileRegion =
     nsIntRect(aTileOrigin.x, aTileOrigin.y,
               GetScaledTileSize().width, GetScaledTileSize().height);
   // Intersect this area with the portion that's invalid.
   tileRegion.SubOut(GetValidRegion());
   tileRegion.SubOut(aDirtyRegion); // Has now been validated
 
   backBuffer->SetWaste(tileRegion.Area() * mResolution * mResolution);
-  backBuffer->Unlock();
-  backBuffer->SyncWithObject(mCompositableClient->GetForwarder()->GetSyncObject());
 
   if (createdTextureClient) {
     if (!mCompositableClient->AddTextureClient(backBuffer)) {
       NS_WARNING("Failed to add tile TextureClient.");
       aTile.DiscardFrontBuffer();
       aTile.DiscardBackBuffer();
       return aTile;
     }