Bug 900133 - Make sure we always call OnTransaction when we might recreate textures. r=nical
authorMatt Woodrow <mwoodrow@mozilla.com>
Sat, 03 Aug 2013 13:29:48 -0400
changeset 153588 fa5a3c887c7b07c15877167052705f6854bcfe01
parent 153587 760e66b2908e70886892d68a45dbc7045bb5dec9
child 153589 64ab855db547f7d6a01d848b57b70f41e0496d44
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs900133
milestone25.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 900133 - Make sure we always call OnTransaction when we might recreate textures. r=nical
gfx/layers/client/ClientCanvasLayer.cpp
gfx/layers/client/ClientImageLayer.cpp
--- a/gfx/layers/client/ClientCanvasLayer.cpp
+++ b/gfx/layers/client/ClientCanvasLayer.cpp
@@ -107,16 +107,17 @@ ClientCanvasLayer::RenderLayer()
   
   FirePreTransactionCallback();
   mCanvasClient->Update(gfx::IntSize(mBounds.width, mBounds.height), this);
 
   FireDidTransactionCallback();
 
   ClientManager()->Hold(this);
   mCanvasClient->Updated();
+  mCanvasClient->OnTransaction();
 }
 
 already_AddRefed<CanvasLayer>
 ClientLayerManager::CreateCanvasLayer()
 {
   NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
   nsRefPtr<ClientCanvasLayer> layer =
     new ClientCanvasLayer(this);
--- a/gfx/layers/client/ClientImageLayer.cpp
+++ b/gfx/layers/client/ClientImageLayer.cpp
@@ -140,16 +140,19 @@ ClientImageLayer::RenderLayer()
     if (HasShadow() && !mContainer->IsAsync()) {
       mImageClient->Connect();
       ClientManager()->Attach(mImageClient, this);
     }
     if (!mImageClient->UpdateImage(mContainer, GetContentFlags())) {
       return;
     }
   }
+  if (mImageClient) {
+    mImageClient->OnTransaction();
+  }
   ClientManager()->Hold(this);
 }
 
 already_AddRefed<ImageLayer>
 ClientLayerManager::CreateImageLayer()
 {
   NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
   nsRefPtr<ClientImageLayer> layer =