Bug 1313281 - Part 1: Remove AsyncTransactionTracker. r=sotaro
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 27 Oct 2016 20:59:23 +1300
changeset 362547 e20bcc969b5df21acd407aad88505b9dc5e5f52a
parent 362546 be7d9851343b6612a322dfa15b11ec099cd94c18
child 362548 9722bbd2b7678fbdc77cf0086aeb85af7272377a
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1313281
milestone52.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 1313281 - Part 1: Remove AsyncTransactionTracker. r=sotaro
dom/media/platforms/omx/GonkOmxPlatformLayer.cpp
gfx/layers/client/CompositableClient.cpp
gfx/layers/client/CompositableClient.h
gfx/layers/client/ImageClient.cpp
gfx/layers/client/ImageClient.h
gfx/layers/client/TextureClient.cpp
gfx/layers/client/TextureClient.h
gfx/layers/ipc/AsyncTransactionTracker.cpp
gfx/layers/ipc/AsyncTransactionTracker.h
gfx/layers/ipc/CompositableForwarder.h
gfx/layers/ipc/CompositableTransactionParent.cpp
gfx/layers/ipc/CompositableTransactionParent.h
gfx/layers/ipc/ImageBridgeChild.cpp
gfx/layers/ipc/ImageBridgeChild.h
gfx/layers/ipc/ImageBridgeParent.cpp
gfx/layers/ipc/ImageBridgeParent.h
gfx/layers/ipc/LayerTransactionChild.h
gfx/layers/ipc/LayersMessages.ipdlh
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/ipc/ShadowLayers.h
gfx/layers/moz.build
--- a/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp
+++ b/dom/media/platforms/omx/GonkOmxPlatformLayer.cpp
@@ -324,20 +324,16 @@ GonkBufferData::GetPlatformMediaData()
       this, info.mDisplay.width, info.mDisplay.height,
       info.mImage.width, info.mImage.height, mBuffer->nTimeStamp);
 
   // Get TextureClient Promise here to wait for resolved.
   RefPtr<GonkBufferData> self(this);
   mTextureClientRecycleHandler->WaitforRecycle()
     ->Then(mGonkPlatformLayer->GetTaskQueue(), __func__,
            [self] () {
-             // Waiting for texture to be freed.
-             if (self->mTextureClientRecycleHandler) {
-               self->mTextureClientRecycleHandler->GetTextureClient()->WaitForBufferOwnership();
-             }
              self->mPromise.ResolveIfExists(self, __func__);
            },
            [self] () {
              OmxBufferFailureHolder failure(OMX_ErrorUndefined, self);
              self->mPromise.RejectIfExists(failure, __func__);
            });
 
   return data.forget();
--- a/gfx/layers/client/CompositableClient.cpp
+++ b/gfx/layers/client/CompositableClient.cpp
@@ -23,32 +23,16 @@
 #include "IPDLActor.h"
 
 namespace mozilla {
 namespace layers {
 
 using namespace mozilla::gfx;
 
 void
-RemoveTextureFromCompositableTracker::ReleaseTextureClient()
-{
-  if (mTextureClient &&
-      mTextureClient->GetAllocator() &&
-      !mTextureClient->GetAllocator()->UsesImageBridge())
-  {
-    RefPtr<TextureClientReleaseTask> task = new TextureClientReleaseTask(mTextureClient);
-    RefPtr<LayersIPCChannel> allocator = mTextureClient->GetAllocator();
-    mTextureClient = nullptr;
-    allocator->GetMessageLoop()->PostTask(task.forget());
-  } else {
-    mTextureClient = nullptr;
-  }
-}
-
-void
 CompositableClient::InitIPDLActor(PCompositableChild* aActor, uint64_t aAsyncID)
 {
   MOZ_ASSERT(aActor);
 
   mForwarder->AssertInForwarderThread();
 
   mCompositableChild = static_cast<CompositableChild*>(aActor);
   mCompositableChild->Init(this, aAsyncID);
--- a/gfx/layers/client/CompositableClient.h
+++ b/gfx/layers/client/CompositableClient.h
@@ -7,17 +7,16 @@
 #define MOZILLA_GFX_BUFFERCLIENT_H
 
 #include <stdint.h>                     // for uint64_t
 #include <vector>                       // for vector
 #include <map>                          // for map
 #include "mozilla/Assertions.h"         // for MOZ_CRASH
 #include "mozilla/RefPtr.h"             // for already_AddRefed, RefCounted
 #include "mozilla/gfx/Types.h"          // for SurfaceFormat
-#include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTracker
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/LayersTypes.h"  // for LayersBackend, TextureDumpMode
 #include "mozilla/layers/TextureClient.h"  // for TextureClient
 #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
 
 namespace mozilla {
 namespace layers {
 
@@ -25,65 +24,16 @@ class CompositableClient;
 class ImageBridgeChild;
 class ImageContainer;
 class CompositableForwarder;
 class CompositableChild;
 class PCompositableChild;
 class TextureClientRecycleAllocator;
 
 /**
- * Handle RemoveTextureFromCompositableAsync() transaction.
- */
-class RemoveTextureFromCompositableTracker : public AsyncTransactionTracker {
-public:
-  explicit RemoveTextureFromCompositableTracker(AsyncTransactionWaiter* aWaiter = nullptr)
-    : AsyncTransactionTracker(aWaiter)
-  {
-    MOZ_COUNT_CTOR(RemoveTextureFromCompositableTracker);
-  }
-
-protected:
-  ~RemoveTextureFromCompositableTracker()
-  {
-    MOZ_COUNT_DTOR(RemoveTextureFromCompositableTracker);
-    ReleaseTextureClient();
-  }
-
-public:
-  virtual void Complete() override
-  {
-    ReleaseTextureClient();
-  }
-
-  virtual void Cancel() override
-  {
-    ReleaseTextureClient();
-  }
-
-  virtual void SetTextureClient(TextureClient* aTextureClient) override
-  {
-    ReleaseTextureClient();
-    mTextureClient = aTextureClient;
-  }
-
-  virtual void SetReleaseFenceHandle(FenceHandle& aReleaseFenceHandle) override
-  {
-    if (mTextureClient) {
-      mTextureClient->SetReleaseFenceHandle(aReleaseFenceHandle);
-    }
-  }
-
-protected:
-  void ReleaseTextureClient();
-
-private:
-  RefPtr<TextureClient> mTextureClient;
-};
-
-/**
  * CompositableClient manages the texture-specific logic for composite layers,
  * independently of the layer. It is the content side of a CompositableClient/
  * CompositableHost pair.
  *
  * CompositableClient's purpose is to send texture data to the compositor side
  * along with any extra information about how the texture is to be composited.
  * Things like opacity or transformation belong to layer and not compositable.
  *
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -61,53 +61,38 @@ ImageClient::CreateImageClient(Composita
   NS_ASSERTION(result, "Failed to create ImageClient");
 
   return result.forget();
 }
 
 void
 ImageClient::RemoveTexture(TextureClient* aTexture)
 {
-  RemoveTextureWithWaiter(aTexture);
-}
-
-void
-ImageClient::RemoveTextureWithWaiter(TextureClient* aTexture,
-                                     AsyncTransactionWaiter* aAsyncTransactionWaiter)
-{
-  if (aAsyncTransactionWaiter &&
-      GetForwarder()->GetTextureForwarder()->UsesImageBridge()) {
-    RefPtr<AsyncTransactionTracker> request =
-      new RemoveTextureFromCompositableTracker(aAsyncTransactionWaiter);
-    GetForwarder()->RemoveTextureFromCompositableAsync(request, this, aTexture);
-    return;
-  }
-  MOZ_ASSERT(!aAsyncTransactionWaiter);
   GetForwarder()->RemoveTextureFromCompositable(this, aTexture);
 }
 
 ImageClientSingle::ImageClientSingle(CompositableForwarder* aFwd,
                                      TextureFlags aFlags,
                                      CompositableType aType)
   : ImageClient(aFwd, aFlags, aType)
 {
 }
 
 TextureInfo ImageClientSingle::GetTextureInfo() const
 {
   return TextureInfo(CompositableType::IMAGE);
 }
 
 void
-ImageClientSingle::FlushAllImages(AsyncTransactionWaiter* aAsyncTransactionWaiter)
+ImageClientSingle::FlushAllImages()
 {
   MOZ_ASSERT(GetForwarder()->GetTextureForwarder()->UsesImageBridge());
 
   for (auto& b : mBuffers) {
-    RemoveTextureWithWaiter(b.mTextureClient, aAsyncTransactionWaiter);
+    RemoveTexture(b.mTextureClient);
   }
   mBuffers.Clear();
 }
 
 /* static */ already_AddRefed<TextureClient>
 ImageClient::CreateTextureClientForImage(Image* aImage, KnowsCompositor* aForwarder)
 {
   RefPtr<TextureClient> texture;
--- a/gfx/layers/client/ImageClient.h
+++ b/gfx/layers/client/ImageClient.h
@@ -6,31 +6,29 @@
 #ifndef MOZILLA_GFX_IMAGECLIENT_H
 #define MOZILLA_GFX_IMAGECLIENT_H
 
 #include <stdint.h>                     // for uint32_t, uint64_t
 #include <sys/types.h>                  // for int32_t
 #include "mozilla/Attributes.h"         // for override
 #include "mozilla/RefPtr.h"             // for RefPtr, already_AddRefed
 #include "mozilla/gfx/Types.h"          // for SurfaceFormat
-#include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTracker
 #include "mozilla/layers/CompositableClient.h"  // for CompositableClient
 #include "mozilla/layers/CompositorTypes.h"  // for CompositableType, etc
 #include "mozilla/layers/LayersSurfaces.h"  // for SurfaceDescriptor
 #include "mozilla/layers/TextureClient.h"  // for TextureClient, etc
 #include "mozilla/mozalloc.h"           // for operator delete
 #include "nsCOMPtr.h"                   // for already_AddRefed
 #include "nsRect.h"                     // for mozilla::gfx::IntRect
 
 namespace mozilla {
 namespace layers {
 
 class ClientLayer;
 class CompositableForwarder;
-class AsyncTransactionTracker;
 class Image;
 class ImageContainer;
 class ShadowableLayer;
 class ImageClientSingle;
 
 /**
  * Image clients are used by basic image layers on the content thread, they
  * always match with an ImageHost on the compositor thread. See
@@ -59,23 +57,20 @@ public:
 
   void SetLayer(ClientLayer* aLayer) { mLayer = aLayer; }
   ClientLayer* GetLayer() const { return mLayer; }
 
   /**
    * asynchronously remove all the textures used by the image client.
    *
    */
-  virtual void FlushAllImages(AsyncTransactionWaiter* aAsyncTransactionWaiter) {}
+  virtual void FlushAllImages() {}
 
   virtual void RemoveTexture(TextureClient* aTexture) override;
 
-  void RemoveTextureWithWaiter(TextureClient* aTexture,
-                               AsyncTransactionWaiter* aAsyncTransactionWaiter = nullptr);
-
   virtual ImageClientSingle* AsImageClientSingle() { return nullptr; }
 
   static already_AddRefed<TextureClient> CreateTextureClientForImage(Image* aImage, KnowsCompositor* aForwarder);
 
 protected:
   ImageClient(CompositableForwarder* aFwd, TextureFlags aFlags,
               CompositableType aType);
 
@@ -97,17 +92,17 @@ public:
   virtual bool UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags) override;
 
   virtual void OnDetach() override;
 
   virtual bool AddTextureClient(TextureClient* aTexture) override;
 
   virtual TextureInfo GetTextureInfo() const override;
 
-  virtual void FlushAllImages(AsyncTransactionWaiter* aAsyncTransactionWaiter) override;
+  virtual void FlushAllImages() override;
 
   ImageClientSingle* AsImageClientSingle() override { return this; }
 
 protected:
   struct Buffer {
     RefPtr<TextureClient> mTextureClient;
     int32_t mImageSerial;
   };
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -5,17 +5,16 @@
 
 #include "mozilla/layers/TextureClient.h"
 #include <stdint.h>                     // for uint8_t, uint32_t, etc
 #include "Layers.h"                     // for Layer, etc
 #include "gfx2DGlue.h"
 #include "gfxPlatform.h"                // for gfxPlatform
 #include "mozilla/Atomics.h"
 #include "mozilla/ipc/SharedMemory.h"   // for SharedMemory, etc
-#include "mozilla/layers/AsyncTransactionTracker.h"
 #include "mozilla/layers/CompositableForwarder.h"
 #include "mozilla/layers/ISurfaceAllocator.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/layers/ImageDataSerializer.h"
 #include "mozilla/layers/TextureClientRecycleAllocator.h"
 #include "mozilla/Mutex.h"
 #include "nsDebug.h"                    // for NS_ASSERTION, NS_WARNING, etc
 #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
@@ -487,20 +486,16 @@ TextureClient::Lock(OpenMode aMode)
   MOZ_ASSERT(!mIsLocked);
   if (!IsValid()) {
     return false;
   }
   if (mIsLocked) {
     return mOpenMode == aMode;
   }
 
-  if (!!mFenceHandleWaiter && (aMode & OpenMode::OPEN_WRITE)) {
-    mFenceHandleWaiter->WaitComplete();
-  }
-
   if (aMode & OpenMode::OPEN_WRITE && IsReadLocked()) {
     NS_WARNING("Attempt to Lock a texture that is being read by the compositor!");
     return false;
   }
 
   LockActor();
 
   FenceHandle* fence = (mReleaseFenceHandle.IsValid() && (aMode & OpenMode::OPEN_WRITE)) ? &mReleaseFenceHandle : nullptr;
@@ -710,24 +705,16 @@ TextureClient::BorrowMappedYCbCrData(Map
 bool
 TextureClient::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor)
 {
   MOZ_ASSERT(IsValid());
 
   return mData ? mData->Serialize(aOutDescriptor) : false;
 }
 
-void
-TextureClient::WaitForBufferOwnership(bool aWaitReleaseFence)
-{
-  if (mFenceHandleWaiter) {
-    mFenceHandleWaiter->WaitComplete();
-  }
-}
-
 // static
 PTextureChild*
 TextureClient::CreateIPDLActor()
 {
   TextureChild* c = new TextureChild();
   c->AddIPDLReference();
   return c;
 }
@@ -813,47 +800,16 @@ TextureClient::SetAddedToCompositableCli
     if (IsValid() && mActor && !mActor->mDestroyed && mActor->IPCOpen()) {
       mActor->SendRecycleTexture(mFlags);
     }
     UnlockActor();
   }
 }
 
 void
-TextureClient::WaitFenceHandleOnImageBridge(Mutex& aMutex)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  aMutex.AssertCurrentThreadOwns();
-
-  if (!mFenceHandleWaiter) {
-    mFenceHandleWaiter = new AsyncTransactionWaiter();
-  }
-  MOZ_ASSERT(mFenceHandleWaiter->GetWaitCount() <= 1);
-  if (mFenceHandleWaiter->GetWaitCount() > 0) {
-    return;
-  }
-  mFenceHandleWaiter->IncrementWaitCount();
-}
-
-void
-TextureClient::ClearWaitFenceHandleOnImageBridge(Mutex& aMutex)
-{
-  aMutex.AssertCurrentThreadOwns();
-
-  if (!mFenceHandleWaiter) {
-    return;
-  }
-  MOZ_ASSERT(mFenceHandleWaiter->GetWaitCount() <= 1);
-  if (mFenceHandleWaiter->GetWaitCount() == 0) {
-    return;
-  }
-  mFenceHandleWaiter->DecrementWaitCount();
-}
-
-void
 TextureClient::CancelWaitFenceHandleOnImageBridge()
 {
   if (!NeedsFenceHandle() || GetFlags() & TextureFlags::RECYCLE) {
     return;
   }
   ImageBridgeChild::GetSingleton()->CancelWaitFenceHandle(this);
 }
 
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -601,24 +601,16 @@ public:
   }
 
   virtual const FenceHandle& GetAcquireFenceHandle() const
   {
     return mAcquireFenceHandle;
   }
 
   /**
-   * This function waits until the buffer is no longer being used.
-   *
-   * XXX - Ideally we shouldn't need this method because Lock the right
-   * thing already.
-   */
-  virtual void WaitForBufferOwnership(bool aWaitReleaseFence = true);
-
-  /**
    * Track how much of this texture is wasted.
    * For example we might allocate a 256x256 tile but only use 10x10.
    */
   void SetWaste(int aWasteArea) {
     mWasteTracker.Update(aWasteArea, BytesPerPixel(GetFormat()));
   }
 
   /**
@@ -643,18 +635,16 @@ public:
 
   uint64_t GetSerial() const { return mSerial; }
 
   bool NeedsFenceHandle()
   {
     return false;
   }
 
-  void WaitFenceHandleOnImageBridge(Mutex& aMutex);
-  void ClearWaitFenceHandleOnImageBridge(Mutex& aMutex);
   void CancelWaitFenceHandleOnImageBridge();
 
   void CancelWaitForRecycle();
 
   /**
    * Set last transaction id of CompositableForwarder.
    * 
    * Called when TextureClient has TextureFlags::RECYCLE flag.
@@ -739,17 +729,16 @@ protected:
   RefPtr<TextureReadLock> mReadLock;
 
   TextureData* mData;
   RefPtr<gfx::DrawTarget> mBorrowedDrawTarget;
 
   TextureFlags mFlags;
   FenceHandle mReleaseFenceHandle;
   FenceHandle mAcquireFenceHandle;
-  RefPtr<AsyncTransactionWaiter> mFenceHandleWaiter;
 
   gl::GfxTextureWasteTracker mWasteTracker;
 
   OpenMode mOpenMode;
 #ifdef DEBUG
   uint32_t mExpectedDtRefs;
 #endif
   bool mIsLocked;
@@ -769,17 +758,16 @@ protected:
   uint64_t mFwdTransactionId;
 
   // Serial id of TextureClient. It is unique in current process.
   const uint64_t mSerial;
   // Used to assign serial ids of TextureClient.
   static mozilla::Atomic<uint64_t> sSerialCounter;
 
   friend class TextureChild;
-  friend class RemoveTextureFromCompositableTracker;
   friend void TestTextureClientSurface(TextureClient*, gfxImageSurface*);
   friend void TestTextureClientYCbCr(TextureClient*, PlanarYCbCrData&);
 
 #ifdef GFX_DEBUG_TRACK_CLIENTS_IN_POOL
 public:
   // Pointer to the pool this tile came from.
   TextureClientPool* mPoolTracker;
 #endif
deleted file mode 100755
--- a/gfx/layers/ipc/AsyncTransactionTracker.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=8 et :
- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "AsyncTransactionTracker.h"
-
-#include "mozilla/layers/ImageBridgeChild.h"  // for ImageBridgeChild
-#include "mozilla/gfx/Logging.h"
-
-namespace mozilla {
-namespace layers {
-
-void
-AsyncTransactionWaiter::WaitComplete()
-{
-  MOZ_ASSERT(!InImageBridgeChildThread());
-
-  MonitorAutoLock mon(mCompletedMonitor);
-  int count = 0;
-  const int maxCount = 5;
-  while (mWaitCount > 0 && (count < maxCount)) {
-    if (!NS_SUCCEEDED(mCompletedMonitor.Wait(PR_MillisecondsToInterval(10000)))) {
-      NS_WARNING("Failed to wait Monitor");
-      return;
-    }
-    if (count > 1) {
-      printf_stderr("Waiting async transaction complete.\n");
-    }
-    count++;
-  }
-
-  if (mWaitCount > 0) {
-    printf_stderr("Timeout of waiting transaction complete.");
-  }
-
-  if (count == maxCount) {
-    gfxDevCrash(gfx::LogReason::AsyncTransactionTimeout) << "Bug 1244883: AsyncTransactionWaiter timed out.";
-  }
-}
-
-Atomic<uint64_t> AsyncTransactionTracker::sSerialCounter(0);
-
-AsyncTransactionTracker::AsyncTransactionTracker(AsyncTransactionWaiter* aWaiter)
-    : mSerial(GetNextSerial())
-    , mWaiter(aWaiter)
-#ifdef DEBUG
-    , mCompleted(false)
-#endif
-{
-  if (mWaiter) {
-    mWaiter->IncrementWaitCount();
-  }
-}
-
-AsyncTransactionTracker::~AsyncTransactionTracker()
-{
-}
-
-void
-AsyncTransactionTracker::NotifyComplete()
-{
-  MOZ_ASSERT(!mCompleted);
-#ifdef DEBUG
-  mCompleted = true;
-#endif
-  Complete();
-  if (mWaiter) {
-    mWaiter->DecrementWaitCount();
-  }
-}
-
-void
-AsyncTransactionTracker::NotifyCancel()
-{
-  MOZ_ASSERT(!mCompleted);
-#ifdef DEBUG
-  mCompleted = true;
-#endif
-  Cancel();
-  if (mWaiter) {
-    mWaiter->DecrementWaitCount();
-  }
-}
-
-Atomic<uint64_t> AsyncTransactionTrackersHolder::sSerialCounter(0);
-
-AsyncTransactionTrackersHolder::AsyncTransactionTrackersHolder()
-  : mSerial(GetNextSerial())
-  , mIsTrackersHolderDestroyed(false)
-{
-  MOZ_COUNT_CTOR(AsyncTransactionTrackersHolder);
-}
-
-AsyncTransactionTrackersHolder::~AsyncTransactionTrackersHolder()
-{
-  if (!mIsTrackersHolderDestroyed) {
-    DestroyAsyncTransactionTrackersHolder();
-  }
-  MOZ_COUNT_DTOR(AsyncTransactionTrackersHolder);
-}
-
-void
-AsyncTransactionTrackersHolder::HoldUntilComplete(AsyncTransactionTracker* aTransactionTracker)
-{
-  if (!aTransactionTracker) {
-    return;
-  }
-
-  if (mIsTrackersHolderDestroyed && aTransactionTracker) {
-    aTransactionTracker->NotifyComplete();
-    return;
-  }
-
-  if (aTransactionTracker) {
-    mAsyncTransactionTrackers[aTransactionTracker->GetId()] = aTransactionTracker;
-  }
-}
-
-void
-AsyncTransactionTrackersHolder::TransactionCompleteted(uint64_t aTransactionId)
-{
-  TransactionCompletetedInternal(aTransactionId);
-}
-
-void
-AsyncTransactionTrackersHolder::TransactionCompletetedInternal(uint64_t aTransactionId)
-{
-  std::map<uint64_t, RefPtr<AsyncTransactionTracker> >::iterator it
-    = mAsyncTransactionTrackers.find(aTransactionId);
-  if (it != mAsyncTransactionTrackers.end()) {
-    it->second->NotifyComplete();
-    mAsyncTransactionTrackers.erase(it);
-  }
-}
-
-void
-AsyncTransactionTrackersHolder::SetReleaseFenceHandle(FenceHandle& aReleaseFenceHandle,
-                                                      uint64_t aTransactionId)
-{
-  std::map<uint64_t, RefPtr<AsyncTransactionTracker> >::iterator it
-    = mAsyncTransactionTrackers.find(aTransactionId);
-  if (it != mAsyncTransactionTrackers.end()) {
-    it->second->SetReleaseFenceHandle(aReleaseFenceHandle);
-  }
-}
-
-void
-AsyncTransactionTrackersHolder::ClearAllAsyncTransactionTrackers()
-{
-  std::map<uint64_t, RefPtr<AsyncTransactionTracker> >::iterator it;
-  for (it = mAsyncTransactionTrackers.begin();
-       it != mAsyncTransactionTrackers.end(); it++) {
-    it->second->NotifyCancel();
-  }
-  mAsyncTransactionTrackers.clear();
-}
-
-void
-AsyncTransactionTrackersHolder::DestroyAsyncTransactionTrackersHolder() {
-  mIsTrackersHolderDestroyed = true;
-  ClearAllAsyncTransactionTrackers();
-}
-
-
-} // namespace layers
-} // namespace mozilla
deleted file mode 100644
--- a/gfx/layers/ipc/AsyncTransactionTracker.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=8 et :
- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_layers_AsyncTransactionTracker_h
-#define mozilla_layers_AsyncTransactionTracker_h
-
-#include <map>
-
-#include "mozilla/Atomics.h"
-#include "mozilla/layers/FenceUtils.h"  // for FenceHandle
-#include "mozilla/Monitor.h"      // for Monitor
-#include "mozilla/RefPtr.h"       // for AtomicRefCounted
-
-namespace mozilla {
-namespace layers {
-
-class TextureClient;
-class AsyncTransactionTrackersHolder;
-
-/**
- * Object that lets you wait for one or more async transactions to complete.
- */
-class AsyncTransactionWaiter
-{
-public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AsyncTransactionWaiter)
-
-  AsyncTransactionWaiter()
-    : mCompletedMonitor("AsyncTransactionWaiter")
-    , mWaitCount(0)
-  {}
-
-  void IncrementWaitCount()
-  {
-    MonitorAutoLock lock(mCompletedMonitor);
-    ++mWaitCount;
-  }
-  void DecrementWaitCount()
-  {
-    MonitorAutoLock lock(mCompletedMonitor);
-    MOZ_ASSERT(mWaitCount > 0);
-    --mWaitCount;
-    if (mWaitCount == 0) {
-      mCompletedMonitor.Notify();
-    }
-  }
-
-  /**
-   * Wait until asynchronous transactions complete.
-   */
-  void WaitComplete();
-
-  uint32_t GetWaitCount() { return mWaitCount; }
-
-private:
-  ~AsyncTransactionWaiter() {}
-
-  Monitor mCompletedMonitor;
-  uint32_t mWaitCount;
-};
-
-/**
- * AsyncTransactionTracker tracks asynchronous transaction.
- * It is typically used for asynchronous layer transaction handling.
- */
-class AsyncTransactionTracker
-{
-  friend class AsyncTransactionTrackersHolder;
-public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AsyncTransactionTracker)
-
-  explicit AsyncTransactionTracker(AsyncTransactionWaiter* aWaiter = nullptr);
-
-  /**
-   * Notify async transaction complete.
-   */
-  void NotifyComplete();
-
-  /**
-   * Notify async transaction cancel.
-   */
-  void NotifyCancel();
-
-  uint64_t GetId()
-  {
-    return mSerial;
-  }
-
-  /**
-   * Called when asynchronous transaction complete.
-   */
-  virtual void Complete()= 0;
-
-  /**
-   * Called when asynchronous transaction is cancelled.
-   * The cancel typically happens when IPC is disconnected
-   */
-  virtual void Cancel()= 0;
-
-  virtual void SetTextureClient(TextureClient* aTextureClient) {}
-
-  virtual void SetReleaseFenceHandle(FenceHandle& aReleaseFenceHandle) {}
-
-protected:
-  virtual ~AsyncTransactionTracker();
-
-  static uint64_t GetNextSerial()
-  {
-    return ++sSerialCounter;
-  }
-
-  uint64_t mSerial;
-  RefPtr<AsyncTransactionWaiter> mWaiter;
-#ifdef DEBUG
-  bool mCompleted;
-#endif
-
-  static Atomic<uint64_t> sSerialCounter;
-};
-
-class AsyncTransactionTrackersHolder
-{
-public:
-  AsyncTransactionTrackersHolder();
-  virtual ~AsyncTransactionTrackersHolder();
-
-  void HoldUntilComplete(AsyncTransactionTracker* aTransactionTracker);
-
-  void TransactionCompleteted(uint64_t aTransactionId);
-
-  static void TransactionCompleteted(uint64_t aHolderId, uint64_t aTransactionId);
-
-  static void SetReleaseFenceHandle(FenceHandle& aReleaseFenceHandle,
-                                    uint64_t aHolderId,
-                                    uint64_t aTransactionId);
-
-  uint64_t GetId()
-  {
-    return mSerial;
-  }
-
-  void DestroyAsyncTransactionTrackersHolder();
-
-protected:
-
-  static uint64_t GetNextSerial()
-  {
-    return ++sSerialCounter;
-  }
-
-  void TransactionCompletetedInternal(uint64_t aTransactionId);
-
-  void SetReleaseFenceHandle(FenceHandle& aReleaseFenceHandle, uint64_t aTransactionId);
-
-  void ClearAllAsyncTransactionTrackers();
-
-  const uint64_t mSerial;
-
-  bool mIsTrackersHolderDestroyed;
-  std::map<uint64_t, RefPtr<AsyncTransactionTracker> > mAsyncTransactionTrackers;
-
-  static Atomic<uint64_t> sSerialCounter;
-};
-
-} // namespace layers
-} // namespace mozilla
-
-#endif  // mozilla_layers_AsyncTransactionTracker_h
--- a/gfx/layers/ipc/CompositableForwarder.h
+++ b/gfx/layers/ipc/CompositableForwarder.h
@@ -21,17 +21,16 @@
 #include "mozilla/gfx/Rect.h"
 #include "nsHashKeys.h"
 #include "nsTHashtable.h"
 
 namespace mozilla {
 namespace layers {
 
 class CompositableClient;
-class AsyncTransactionTracker;
 class ImageContainer;
 class SurfaceDescriptor;
 class SurfaceDescriptorTiles;
 class ThebesBufferData;
 class PTextureChild;
 
 /**
  * A transaction is a set of changes that happenned on the content side, that
@@ -83,29 +82,16 @@ public:
    * This function does not delete the TextureHost corresponding to the
    * TextureClient passed in parameter.
    * When the TextureClient has TEXTURE_DEALLOCATE_CLIENT flag,
    * the transaction becomes synchronous.
    */
   virtual void RemoveTextureFromCompositable(CompositableClient* aCompositable,
                                              TextureClient* aTexture) = 0;
 
-  /**
-   * Tell the CompositableHost on the compositor side to remove the texture
-   * from the CompositableHost. The compositor side sends back transaction
-   * complete message.
-   * This function does not delete the TextureHost corresponding to the
-   * TextureClient passed in parameter.
-   * It is used when the TextureClient recycled.
-   * Only ImageBridge implements it.
-   */
-  virtual void RemoveTextureFromCompositableAsync(AsyncTransactionTracker* aAsyncTransactionTracker,
-                                                  CompositableClient* aCompositable,
-                                                  TextureClient* aTexture) {}
-
   struct TimedTextureClient {
     TimedTextureClient()
         : mTextureClient(nullptr), mFrameID(0), mProducerID(0) {}
 
     TextureClient* mTextureClient;
     TimeStamp mTimeStamp;
     nsIntRect mPictureRect;
     int32_t mFrameID;
--- a/gfx/layers/ipc/CompositableTransactionParent.cpp
+++ b/gfx/layers/ipc/CompositableTransactionParent.cpp
@@ -153,31 +153,16 @@ CompositableParentManager::ReceiveCompos
       const OpRemoveTexture& op = aEdit.detail().get_OpRemoveTexture();
 
       RefPtr<TextureHost> tex = TextureHost::AsTextureHost(op.textureParent());
 
       MOZ_ASSERT(tex.get());
       compositable->RemoveTextureHost(tex);
       break;
     }
-    case CompositableOperationDetail::TOpRemoveTextureAsync: {
-      const OpRemoveTextureAsync& op = aEdit.detail().get_OpRemoveTextureAsync();
-      RefPtr<TextureHost> tex = TextureHost::AsTextureHost(op.textureParent());
-
-      MOZ_ASSERT(tex.get());
-      compositable->RemoveTextureHost(tex);
-
-      // Only ImageBridge child sends it.
-      MOZ_ASSERT(UsesImageBridge());
-      if (UsesImageBridge()) {
-        ReplyRemoveTexture(OpReplyRemoveTexture(op.holderId(),
-                                                op.transactionId()));
-      }
-      break;
-    }
     case CompositableOperationDetail::TOpUseTexture: {
       const OpUseTexture& op = aEdit.detail().get_OpUseTexture();
 
       AutoTArray<CompositableHost::TimedTexture,4> textures;
       for (auto& timedTexture : op.textures()) {
         CompositableHost::TimedTexture* t = textures.AppendElement();
         t->mTexture =
             TextureHost::AsTextureHost(timedTexture.textureParent());
--- a/gfx/layers/ipc/CompositableTransactionParent.h
+++ b/gfx/layers/ipc/CompositableTransactionParent.h
@@ -5,17 +5,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H
 #define MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H
 
 #include <vector>                       // for vector
 #include "mozilla/Attributes.h"         // for override
-#include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTracker
 #include "mozilla/layers/ISurfaceAllocator.h"  // for ISurfaceAllocator
 #include "mozilla/layers/LayersMessages.h"  // for EditReply, etc
 
 namespace mozilla {
 namespace layers {
 
 class CompositableHost;
 
@@ -42,17 +41,15 @@ public:
 
 protected:
   /**
    * Handle the IPDL messages that affect PCompositable actors.
    */
   bool ReceiveCompositableUpdate(const CompositableOperation& aEdit,
                                  EditReplyVector& replyv);
 
-  virtual void ReplyRemoveTexture(const OpReplyRemoveTexture& aReply) {};
-
   uint64_t mFwdTransactionId = 0;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -459,17 +459,16 @@ ImageBridgeChild::~ImageBridgeChild()
 {
   delete mTxn;
 }
 
 void
 ImageBridgeChild::MarkShutDown()
 {
   mTexturesWaitingRecycled.Clear();
-  mTrackersHolder.DestroyAsyncTransactionTrackersHolder();
 
   mCanSend = false;
 }
 
 void
 ImageBridgeChild::Connect(CompositableClient* aCompositable,
                           ImageContainer* aImageContainer)
 {
@@ -644,59 +643,53 @@ ImageBridgeChild::UpdateAsyncCanvasRende
   BeginTransaction();
   aWrapper->GetCanvasClient()->Updated();
   EndTransaction();
 }
 
 void
 ImageBridgeChild::FlushAllImagesSync(SynchronousTask* aTask,
                                      ImageClient* aClient,
-                                     ImageContainer* aContainer,
-                                     RefPtr<AsyncTransactionWaiter> aWaiter)
+                                     ImageContainer* aContainer)
 {
-  MOZ_ASSERT(!aWaiter);
-
   AutoCompleteTask complete(aTask);
 
   if (!CanSend()) {
     return;
   }
 
   MOZ_ASSERT(aClient);
   BeginTransaction();
   if (aContainer) {
     aContainer->ClearImagesFromImageBridge();
   }
-  aClient->FlushAllImages(aWaiter);
+  aClient->FlushAllImages();
   EndTransaction();
 }
 
 void
 ImageBridgeChild::FlushAllImages(ImageClient* aClient, ImageContainer* aContainer)
 {
   MOZ_ASSERT(aClient);
   MOZ_ASSERT(!InImageBridgeChildThread());
 
   if (InImageBridgeChildThread()) {
     NS_ERROR("ImageBridgeChild::FlushAllImages() is called on ImageBridge thread.");
     return;
   }
 
   SynchronousTask task("FlushAllImages Lock");
 
-  RefPtr<AsyncTransactionWaiter> waiter;
-
   // RefPtrs on arguments are not needed since this dispatches synchronously.
   RefPtr<Runnable> runnable = WrapRunnable(
     RefPtr<ImageBridgeChild>(this),
     &ImageBridgeChild::FlushAllImagesSync,
     &task,
     aClient,
-    aContainer,
-    waiter);
+    aContainer);
   GetMessageLoop()->PostTask(runnable.forget());
 
   task.Wait();
 }
 
 void
 ImageBridgeChild::BeginTransaction()
 {
@@ -1235,23 +1228,16 @@ ImageBridgeChild::RecvParentAsyncMessage
         // LayerTransactionChild. It is used only on gonk to deliver fence to
         // a TextureClient that does not have TextureFlags::RECYCLE.
         // In this case, LayerTransactionChild's ipc could not be used to deliver fence.
 
         const OpNotifyNotUsedToNonRecycle& op = message.get_OpNotifyNotUsedToNonRecycle();
         NotifyNotUsedToNonRecycle(op.TextureId(), op.fwdTransactionId());
         break;
       }
-      case AsyncParentMessageData::TOpReplyRemoveTexture: {
-        const OpReplyRemoveTexture& op = message.get_OpReplyRemoveTexture();
-
-        MOZ_ASSERT(mTrackersHolder.GetId() == op.holderId());
-        mTrackersHolder.TransactionCompleteted(op.transactionId());
-        break;
-      }
       default:
         NS_ERROR("unknown AsyncParentMessageData type");
         return false;
     }
   }
   return true;
 }
 
@@ -1325,42 +1311,16 @@ ImageBridgeChild::RemoveTextureFromCompo
 
   if (aTexture->GetFlags() & TextureFlags::DEALLOCATE_CLIENT) {
     mTxn->AddEdit(op);
   } else {
     mTxn->AddNoSwapEdit(op);
   }
 }
 
-void
-ImageBridgeChild::RemoveTextureFromCompositableAsync(AsyncTransactionTracker* aAsyncTransactionTracker,
-                                                     CompositableClient* aCompositable,
-                                                     TextureClient* aTexture)
-{
-  MOZ_ASSERT(CanSend());
-  MOZ_ASSERT(aTexture);
-  MOZ_ASSERT(aTexture->IsSharedWithCompositor());
-  MOZ_ASSERT(aCompositable->IsConnected());
-  if (!aTexture || !aTexture->IsSharedWithCompositor() || !aCompositable->IsConnected()) {
-    return;
-  }
-
-  CompositableOperation op(
-    nullptr, aCompositable->GetIPDLActor(),
-    OpRemoveTextureAsync(
-      mTrackersHolder.GetId(),
-      aAsyncTransactionTracker->GetId(),
-      nullptr, aCompositable->GetIPDLActor(),
-      nullptr, aTexture->GetIPDLActor()));
-
-  mTxn->AddNoSwapEdit(op);
-  // Hold AsyncTransactionTracker until receving reply
-  mTrackersHolder.HoldUntilComplete(aAsyncTransactionTracker);
-}
-
 bool ImageBridgeChild::IsSameProcess() const
 {
   return OtherPid() == base::GetCurrentProcId();
 }
 
 void
 ImageBridgeChild::Destroy(CompositableChild* aCompositable)
 {
--- a/gfx/layers/ipc/ImageBridgeChild.h
+++ b/gfx/layers/ipc/ImageBridgeChild.h
@@ -7,17 +7,16 @@
 #define MOZILLA_GFX_IMAGEBRIDGECHILD_H
 
 #include <stddef.h>                     // for size_t
 #include <stdint.h>                     // for uint32_t, uint64_t
 #include "mozilla/Attributes.h"         // for override
 #include "mozilla/Atomics.h"
 #include "mozilla/RefPtr.h"             // for already_AddRefed
 #include "mozilla/ipc/SharedMemory.h"   // for SharedMemory, etc
-#include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTrackerHolder
 #include "mozilla/layers/CanvasClient.h"
 #include "mozilla/layers/CompositableForwarder.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/PImageBridgeChild.h"
 #include "mozilla/Mutex.h"
 #include "nsDebug.h"                    // for NS_RUNTIMEABORT
 #include "nsIObserver.h"
 #include "nsRegion.h"                   // for nsIntRegion
@@ -32,17 +31,16 @@ class Thread;
 namespace mozilla {
 namespace ipc {
 class Shmem;
 } // namespace ipc
 
 namespace layers {
 
 class AsyncCanvasRenderer;
-class AsyncTransactionTracker;
 class ImageClient;
 class ImageContainer;
 class ImageContainerChild;
 class ImageBridgeParent;
 class CompositableClient;
 struct CompositableTransaction;
 class Image;
 class TextureClient;
@@ -252,18 +250,17 @@ private:
   void UpdateAsyncCanvasRendererNow(AsyncCanvasRenderer* aClient);
   void UpdateAsyncCanvasRendererSync(
     SynchronousTask* aTask,
     AsyncCanvasRenderer* aWrapper);
 
   void FlushAllImagesSync(
     SynchronousTask* aTask,
     ImageClient* aClient,
-    ImageContainer* aContainer,
-    RefPtr<AsyncTransactionWaiter> aWaiter);
+    ImageContainer* aContainer);
 
   void ProxyAllocShmemNow(SynchronousTask* aTask, AllocShmemParams* aParams);
   void ProxyDeallocShmemNow(SynchronousTask* aTask, Shmem* aShmem);
 
 public:
   // CompositableForwarder
 
   virtual void Connect(CompositableClient* aCompositable,
@@ -307,20 +304,16 @@ public:
   virtual void CancelWaitForRecycle(uint64_t aTextureId) override;
 
   virtual bool DestroyInTransaction(PTextureChild* aTexture, bool synchronously) override;
   virtual bool DestroyInTransaction(PCompositableChild* aCompositable, bool synchronously) override;
 
   virtual void RemoveTextureFromCompositable(CompositableClient* aCompositable,
                                              TextureClient* aTexture) override;
 
-  virtual void RemoveTextureFromCompositableAsync(AsyncTransactionTracker* aAsyncTransactionTracker,
-                                                  CompositableClient* aCompositable,
-                                                  TextureClient* aTexture) override;
-
   virtual void UseTiledLayerBuffer(CompositableClient* aCompositable,
                                    const SurfaceDescriptorTiles& aTileLayerDescriptor) override
   {
     NS_RUNTIMEABORT("should not be called");
   }
 
   virtual void UpdateTextureRegion(CompositableClient* aCompositable,
                                    const ThebesBufferData& aThebesBufferData,
@@ -403,16 +396,14 @@ private:
    */
   uint64_t mFwdTransactionId;
 
   /**
    * Hold TextureClients refs until end of their usages on host side.
    * It defer calling of TextureClient recycle callback.
    */
   nsDataHashtable<nsUint64HashKey, RefPtr<TextureClient> > mTexturesWaitingRecycled;
-
-  AsyncTransactionTrackersHolder mTrackersHolder;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif
--- a/gfx/layers/ipc/ImageBridgeParent.cpp
+++ b/gfx/layers/ipc/ImageBridgeParent.cpp
@@ -403,22 +403,16 @@ ImageBridgeParent::DeallocShmem(ipc::Shm
 }
 
 bool ImageBridgeParent::IsSameProcess() const
 {
   return OtherPid() == base::GetCurrentProcId();
 }
 
 void
-ImageBridgeParent::ReplyRemoveTexture(const OpReplyRemoveTexture& aReply)
-{
-  mPendingAsyncMessage.push_back(aReply);
-}
-
-void
 ImageBridgeParent::SendFenceHandleToNonRecycle(PTextureParent* aTexture)
 {
   RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture);
   if (!texture) {
     return;
   }
 
   if (!(texture->GetFlags() & TextureFlags::RECYCLE) &&
--- a/gfx/layers/ipc/ImageBridgeParent.h
+++ b/gfx/layers/ipc/ImageBridgeParent.h
@@ -108,18 +108,16 @@ public:
   virtual bool AllocUnsafeShmem(size_t aSize,
                                 ipc::SharedMemory::SharedMemoryType aType,
                                 ipc::Shmem* aShmem) override;
 
   virtual void DeallocShmem(ipc::Shmem& aShmem) override;
 
   virtual bool IsSameProcess() const override;
 
-  virtual void ReplyRemoveTexture(const OpReplyRemoveTexture& aReply) override;
-
   void SendFenceHandleToNonRecycle(PTextureParent* aTexture);
 
   void NotifyNotUsedToNonRecycle(PTextureParent* aTexture,
                                  uint64_t aTransactionId);
 
   static void NotifyNotUsedToNonRecycle(base::ProcessId aChildProcessId,
                                         PTextureParent* aTexture,
                                         uint64_t aTransactionId);
--- a/gfx/layers/ipc/LayerTransactionChild.h
+++ b/gfx/layers/ipc/LayerTransactionChild.h
@@ -6,17 +6,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
 #define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
 
 #include <stdint.h>                     // for uint32_t
 #include "mozilla/Attributes.h"         // for override
 #include "mozilla/ipc/ProtocolUtils.h"
-#include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTracker
 #include "mozilla/layers/PLayerTransactionChild.h"
 #include "mozilla/RefPtr.h"
 
 namespace mozilla {
 
 namespace layout {
 class RenderFrameChild;
 } // namespace layout
--- a/gfx/layers/ipc/LayersMessages.ipdlh
+++ b/gfx/layers/ipc/LayersMessages.ipdlh
@@ -370,28 +370,16 @@ struct OpPaintTextureRegion {
 
 /**
  * Tells the CompositableHost to remove the corresponding TextureHost
  */
 struct OpRemoveTexture {
   PTexture texture;
 };
 
-struct OpRemoveTextureAsync {
-  uint64_t holderId;
-  uint64_t transactionId;
-  PCompositable compositable;
-  PTexture texture;
-};
-
-struct OpReplyRemoveTexture {
-  uint64_t holderId;
-  uint64_t transactionId;
-};
-
 union MaybeFence {
   FenceHandle;
   null_t;
 };
 
 struct TimedTexture {
   PTexture texture;
   ReadLockDescriptor sharedLock;
@@ -449,17 +437,16 @@ struct OpNotifyNotUsedToNonRecycle {
 };
 
 union CompositableOperationDetail {
   OpPaintTextureRegion;
 
   OpUseTiledLayerBuffer;
 
   OpRemoveTexture;
-  OpRemoveTextureAsync;
 
   OpUseTexture;
   OpUseComponentAlphaTextures;
   OpUseOverlaySource;
 };
 
 struct CompositableOperation {
   PCompositable compositable;
@@ -526,13 +513,12 @@ union EditReply {
   OpContentBufferSwap;
 };
 
 union AsyncParentMessageData {
   OpDeliverFence;
   OpDeliverFenceToNonRecycle;
   OpNotifyNotUsed;
   OpNotifyNotUsedToNonRecycle;
-  OpReplyRemoveTexture;
 };
 
 } // namespace
 } // namespace
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -489,24 +489,16 @@ ShadowLayerForwarder::RemoveTextureFromC
     CompositableOperation(
       nullptr, aCompositable->GetIPDLActor(),
       OpRemoveTexture(nullptr, aTexture->GetIPDLActor())));
   if (aTexture->GetFlags() & TextureFlags::DEALLOCATE_CLIENT) {
     mTxn->MarkSyncTransaction();
   }
 }
 
-void
-ShadowLayerForwarder::RemoveTextureFromCompositableAsync(AsyncTransactionTracker* aAsyncTransactionTracker,
-                                                         CompositableClient* aCompositable,
-                                                         TextureClient* aTexture)
-{
-  NS_RUNTIMEABORT("not reached");
-}
-
 bool
 ShadowLayerForwarder::InWorkerThread()
 {
   return MessageLoop::current() && (GetTextureForwarder()->GetMessageLoop()->id() == MessageLoop::current()->id());
 }
 
 void
 ShadowLayerForwarder::StorePluginWidgetConfigurations(const nsTArray<nsIWidget::Configuration>&
--- a/gfx/layers/ipc/ShadowLayers.h
+++ b/gfx/layers/ipc/ShadowLayers.h
@@ -249,20 +249,16 @@ public:
                                    const SurfaceDescriptorTiles& aTileLayerDescriptor) override;
 
   bool DestroyInTransaction(PTextureChild* aTexture, bool synchronously) override;
   bool DestroyInTransaction(PCompositableChild* aCompositable, bool synchronously) override;
 
   virtual void RemoveTextureFromCompositable(CompositableClient* aCompositable,
                                              TextureClient* aTexture) override;
 
-  virtual void RemoveTextureFromCompositableAsync(AsyncTransactionTracker* aAsyncTransactionTracker,
-                                                  CompositableClient* aCompositable,
-                                                  TextureClient* aTexture) override;
-
   /**
    * Communicate to the compositor that aRegion in the texture identified by aLayer
    * and aIdentifier has been updated to aThebesBuffer.
    */
   virtual void UpdateTextureRegion(CompositableClient* aCompositable,
                                    const ThebesBufferData& aThebesBufferData,
                                    const nsIntRegion& aUpdatedRegion) override;
 
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -158,17 +158,16 @@ EXPORTS.mozilla.layers += [
     'CompositorTypes.h',
     'D3D11ShareHandleImage.h',
     'D3D9SurfaceImage.h',
     'Effects.h',
     'ImageDataSerializer.h',
     'ipc/APZChild.h',
     'ipc/APZCTreeManagerChild.h',
     'ipc/APZCTreeManagerParent.h',
-    'ipc/AsyncTransactionTracker.h',
     'ipc/CompositableForwarder.h',
     'ipc/CompositableTransactionParent.h',
     'ipc/CompositorBridgeChild.h',
     'ipc/CompositorBridgeParent.h',
     'ipc/CompositorThread.h',
     'ipc/FenceUtils.h',
     'ipc/GonkNativeHandle.h',
     'ipc/GonkNativeHandleUtils.h',
@@ -327,17 +326,16 @@ UNIFIED_SOURCES += [
     'Effects.cpp',
     'FrameMetrics.cpp',
     'GLImages.cpp',
     'ImageDataSerializer.cpp',
     'ImageLayers.cpp',
     'ipc/APZChild.cpp',
     'ipc/APZCTreeManagerChild.cpp',
     'ipc/APZCTreeManagerParent.cpp',
-    'ipc/AsyncTransactionTracker.cpp',
     'ipc/CompositableForwarder.cpp',
     'ipc/CompositableTransactionParent.cpp',
     'ipc/CompositorBench.cpp',
     'ipc/CompositorBridgeChild.cpp',
     'ipc/CompositorBridgeParent.cpp',
     'ipc/CompositorThread.cpp',
     'ipc/FenceUtils.cpp',
     'ipc/ImageBridgeChild.cpp',