Bug 1143575. Remove unused CompositableClient::OnTransaction. r=nical draft
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 25 Mar 2015 21:30:25 +1300
changeset 275566 6c9e81f36463d2b9b0f137fbe81cc7323d8d23c4
parent 275565 5e34aee5440a2989b1bf48d092fdc16de7aa2d05
child 275567 a4d9efef6b2937a831b83c8e937161b14b588d6e
push id3189
push userrocallahan@mozilla.com
push dateFri, 03 Jul 2015 11:12:01 +0000
reviewersnical
bugs1143575
milestone42.0a1
Bug 1143575. Remove unused CompositableClient::OnTransaction. r=nical
gfx/layers/client/ClientCanvasLayer.cpp
gfx/layers/client/ClientImageLayer.cpp
gfx/layers/client/CompositableClient.cpp
gfx/layers/client/CompositableClient.h
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ClientCanvasLayer.cpp
+++ b/gfx/layers/client/ClientCanvasLayer.cpp
@@ -169,17 +169,16 @@ ClientCanvasLayer::RenderLayer()
 
   FirePreTransactionCallback();
   mCanvasClient->Update(gfx::IntSize(mBounds.width, mBounds.height), this);
 
   FireDidTransactionCallback();
 
   ClientManager()->Hold(this);
   mCanvasClient->Updated();
-  mCanvasClient->OnTransaction();
 }
 
 CanvasClient::CanvasClientType
 ClientCanvasLayer::GetCanvasClientType()
 {
   if (mGLContext) {
     return CanvasClient::CanvasClientTypeShSurf;
   }
--- a/gfx/layers/client/ClientImageLayer.cpp
+++ b/gfx/layers/client/ClientImageLayer.cpp
@@ -127,20 +127,16 @@ void
 ClientImageLayer::RenderLayer()
 {
   RenderMaskLayers(this);
 
   if (!mContainer) {
      return;
   }
 
-  if (mImageClient) {
-    mImageClient->OnTransaction();
-  }
-
   if (!mImageClient ||
       !mImageClient->UpdateImage(mContainer, GetContentFlags())) {
     CompositableType type = GetImageClientType();
     if (type == CompositableType::UNKNOWN) {
       return;
     }
     TextureFlags flags = TextureFlags::DEFAULT;
     if (mDisallowBigImage) {
@@ -159,19 +155,16 @@ ClientImageLayer::RenderLayer()
     if (HasShadow() && !mContainer->IsAsync()) {
       mImageClient->Connect();
       ClientManager()->AsShadowForwarder()->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 =
--- a/gfx/layers/client/CompositableClient.cpp
+++ b/gfx/layers/client/CompositableClient.cpp
@@ -223,21 +223,16 @@ CompositableClient::AddTextureClient(Tex
   if(!aClient || !aClient->IsAllocated()) {
     return false;
   }
   aClient->SetAddedToCompositableClient();
   return aClient->InitIPDLActor(mForwarder);
 }
 
 void
-CompositableClient::OnTransaction()
-{
-}
-
-void
 CompositableClient::ClearCachedResources()
 {
   if (mTextureClientRecycler) {
     mTextureClientRecycler = nullptr;
   }
 }
 
 void
--- a/gfx/layers/client/CompositableClient.h
+++ b/gfx/layers/client/CompositableClient.h
@@ -172,21 +172,16 @@ public:
   uint64_t GetAsyncID() const;
 
   /**
    * Tells the Compositor to create a TextureHost for this TextureClient.
    */
   virtual bool AddTextureClient(TextureClient* aClient);
 
   /**
-   * A hook for the Compositable to execute whatever it held off for next transaction.
-   */
-  virtual void OnTransaction();
-
-  /**
    * A hook for the when the Compositable is detached from it's layer.
    */
   virtual void OnDetach() {}
 
   /**
    * Clear any resources that are not immediately necessary. This may be called
    * in low-memory conditions.
    */
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -94,28 +94,16 @@ ContentClient::CreateContentClient(Compo
     return MakeAndAddRef<ContentClientDoubleBuffered>(aForwarder);
   }
   return MakeAndAddRef<ContentClientSingleBuffered>(aForwarder);
 }
 
 void
 ContentClient::EndPaint(nsTArray<ReadbackProcessor::Update>* aReadbackUpdates)
 {
-  // It is very important that this is called after any overridden EndPaint behaviour,
-  // because destroying textures is a three stage process:
-  // 1. We are done with the buffer and move it to ContentClient::mOldTextures,
-  // that happens in DestroyBuffers which is may be called indirectly from
-  // PaintThebes.
-  // 2. The content client calls RemoveTextureClient on the texture clients in
-  // mOldTextures and forgets them. They then become invalid. The compositable
-  // client keeps a record of IDs. This happens in EndPaint.
-  // 3. An IPC message is sent to destroy the corresponding texture host. That
-  // happens from OnTransaction.
-  // It is important that these steps happen in order.
-  OnTransaction();
 }
 
 void
 ContentClient::PrintInfo(std::stringstream& aStream, const char* aPrefix)
 {
   aStream << aPrefix;
   aStream << nsPrintfCString("ContentClient (0x%p)", this).get();