Make sure tile textures are synchronized for D3D11. (bug 1119066, r=mattwoodrow)
authorDavid Anderson <danderson@mozilla.com>
Fri, 09 Jan 2015 13:50:20 -0800
changeset 236126 6713687c18b3cea8f7dad9301ef08a984fe3ac0d
parent 236125 87d51f6a3c2985b2b6ed1248aff1f363941fdb97
child 236127 157873c02e6df14dce33df159b22753df1f643fb
push id389
push usermartin.thomson@gmail.com
push dateFri, 09 Jan 2015 23:59:51 +0000
reviewersmattwoodrow
bugs1119066
milestone37.0a1
Make sure tile textures are synchronized for D3D11. (bug 1119066, r=mattwoodrow)
gfx/layers/client/TiledContentClient.cpp
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -1282,16 +1282,17 @@ ClientTiledLayerBuffer::ValidateTile(Til
     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;
     }