Bug 1020003 - Always use AsyncTransactionTracker on ImageBridge on gonk r=nical
authorSotaro Ikeda <sikeda@mozilla.com>
Thu, 05 Jun 2014 08:39:45 -0700
changeset 186851 3bfcfcc0cfd33c1b7d67c3be8c810eef33d4dad7
parent 186850 150dc6f784700f3ee0f9c3c8860e29da2321e4cc
child 186852 241b30e04b573a5cbb818d3edbc11be7cbef8a3a
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersnical
bugs1020003
milestone32.0a1
Bug 1020003 - Always use AsyncTransactionTracker on ImageBridge on gonk r=nical
gfx/layers/client/ImageClient.cpp
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -76,27 +76,25 @@ ImageClient::RemoveTexture(TextureClient
   RemoveTextureWithTracker(aTexture, nullptr);
 }
 
 void
 ImageClient::RemoveTextureWithTracker(TextureClient* aTexture,
                                       AsyncTransactionTracker* aAsyncTransactionTracker)
 {
 #ifdef MOZ_WIDGET_GONK
-  // AsyncTransactionTracker is supported only on ImageBridge.
-  // Use AsyncTransactionTracker only when TextureClient is recyeled.
   if (aAsyncTransactionTracker ||
-      (GetForwarder()->IsImageBridgeChild() && aTexture->HasRecycleCallback())) {
+      GetForwarder()->IsImageBridgeChild()) {
     RefPtr<AsyncTransactionTracker> request = aAsyncTransactionTracker;
     if (!request) {
       // Create AsyncTransactionTracker if it is not provided as argument.
       request = new RemoveTextureFromCompositableTracker();
     }
     // Hold TextureClient until the transaction complete to postpone
-    // the TextureClient recycle.
+    // the TextureClient recycle/delete.
     request->SetTextureClient(aTexture);
     GetForwarder()->RemoveTextureFromCompositableAsync(request, this, aTexture);
     return;
   }
 #endif
 
   GetForwarder()->RemoveTextureFromCompositable(this, aTexture);
   if (aAsyncTransactionTracker) {