Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Fri, 07 Jun 2019 12:27:05 +0000
changeset 477830 c8e02f61df9a7fa3761b985aac415fd6100d2ff9
parent 477829 de70a3fa29dbbcbc5dc5e0df0cc499fb715604de
child 477831 001368dceb3383f70926cd98fc0a83e7073bd2b3
push id36125
push userapavel@mozilla.com
push dateFri, 07 Jun 2019 22:00:07 +0000
treeherdermozilla-central@d820bbb356aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1557257
milestone69.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 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical Differential Revision: https://phabricator.services.mozilla.com/D33928
dom/media/MediaData.cpp
dom/media/webrtc/MediaEngineTabVideoSource.cpp
gfx/layers/D3D11ShareHandleImage.cpp
gfx/layers/D3D11ShareHandleImage.h
gfx/layers/D3D11YCbCrImage.cpp
gfx/layers/D3D11YCbCrImage.h
gfx/layers/D3D9SurfaceImage.cpp
gfx/layers/D3D9SurfaceImage.h
gfx/layers/GPUVideoImage.h
gfx/layers/IMFYCbCrImage.cpp
gfx/layers/IMFYCbCrImage.h
gfx/layers/ImageContainer.cpp
gfx/layers/ImageContainer.h
gfx/layers/MacIOSurfaceImage.cpp
gfx/layers/MacIOSurfaceImage.h
gfx/layers/TextureWrapperImage.cpp
gfx/layers/TextureWrapperImage.h
gfx/layers/client/ImageClient.cpp
gfx/layers/client/TextureClient.cpp
gfx/layers/client/TextureClient.h
gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
gfx/layers/ipc/SharedPlanarYCbCrImage.h
gfx/layers/ipc/SharedRGBImage.cpp
gfx/layers/ipc/SharedRGBImage.h
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -411,17 +411,17 @@ already_AddRefed<VideoData> VideoData::C
   }
   if (!videoImage->Allocate(
           IntSize(aBuffer.mPlanes[0].mWidth, aBuffer.mPlanes[0].mHeight),
           SurfaceFormat::B8G8R8A8)) {
     return nullptr;
   }
 
   RefPtr<layers::TextureClient> texture =
-      videoImage->GetTextureClient(/* aForwarder */ nullptr);
+      videoImage->GetTextureClient(/* aKnowsCompositor */ nullptr);
   if (!texture) {
     NS_WARNING("Failed to allocate TextureClient");
     return nullptr;
   }
 
   layers::TextureClientAutoLock autoLock(texture,
                                          layers::OpenMode::OPEN_WRITE_ONLY);
   if (!autoLock.Succeeded()) {
--- a/dom/media/webrtc/MediaEngineTabVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineTabVideoSource.cpp
@@ -341,17 +341,17 @@ void MediaEngineTabVideoSource::Draw() {
     return;
   }
   if (!rgbImage->Allocate(size, SurfaceFormat::B8G8R8X8)) {
     NS_WARNING("Failed to allocate a shared image");
     return;
   }
 
   RefPtr<layers::TextureClient> texture =
-      rgbImage->GetTextureClient(/* aForwarder */ nullptr);
+      rgbImage->GetTextureClient(/* aKnowsCompositor */ nullptr);
   if (!texture) {
     NS_WARNING("Failed to allocate TextureClient");
     return;
   }
 
   {
     layers::TextureClientAutoLock autoLock(texture,
                                            layers::OpenMode::OPEN_WRITE_ONLY);
--- a/gfx/layers/D3D11ShareHandleImage.cpp
+++ b/gfx/layers/D3D11ShareHandleImage.cpp
@@ -53,17 +53,17 @@ bool D3D11ShareHandleImage::AllocateText
         aDevice->CreateTexture2D(&newDesc, nullptr, getter_AddRefs(mTexture));
     return SUCCEEDED(hr);
   }
 }
 
 gfx::IntSize D3D11ShareHandleImage::GetSize() const { return mSize; }
 
 TextureClient* D3D11ShareHandleImage::GetTextureClient(
-    KnowsCompositor* aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
   return mTextureClient;
 }
 
 already_AddRefed<gfx::SourceSurface>
 D3D11ShareHandleImage::GetAsSourceSurface() {
   RefPtr<ID3D11Texture2D> texture = GetTexture();
   if (!texture) {
     gfxWarning() << "Cannot readback from shared texture because no texture is "
--- a/gfx/layers/D3D11ShareHandleImage.h
+++ b/gfx/layers/D3D11ShareHandleImage.h
@@ -54,17 +54,17 @@ class D3D11ShareHandleImage final : publ
                         gfx::YUVColorSpace aColorSpace);
   virtual ~D3D11ShareHandleImage() = default;
 
   bool AllocateTexture(D3D11RecycleAllocator* aAllocator,
                        ID3D11Device* aDevice);
 
   gfx::IntSize GetSize() const override;
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
   gfx::IntRect GetPictureRect() const override { return mPictureRect; }
 
   ID3D11Texture2D* GetTexture() const;
 
   gfx::YUVColorSpace GetYUVColorSpace() const { return mYUVColorSpace; }
 
  private:
   friend class gl::GLBlitHelper;
--- a/gfx/layers/D3D11YCbCrImage.cpp
+++ b/gfx/layers/D3D11YCbCrImage.cpp
@@ -117,17 +117,18 @@ bool D3D11YCbCrImage::SetData(KnowsCompo
     return false;
   }
 
   return true;
 }
 
 IntSize D3D11YCbCrImage::GetSize() const { return mPictureRect.Size(); }
 
-TextureClient* D3D11YCbCrImage::GetTextureClient(KnowsCompositor* aForwarder) {
+TextureClient* D3D11YCbCrImage::GetTextureClient(
+    KnowsCompositor* aKnowsCompositor) {
   return mTextureClient;
 }
 
 const DXGIYCbCrTextureData* D3D11YCbCrImage::GetData() const {
   if (!mTextureClient) return nullptr;
 
   return mTextureClient->GetInternalData()->AsDXGIYCbCrTextureData();
 }
--- a/gfx/layers/D3D11YCbCrImage.h
+++ b/gfx/layers/D3D11YCbCrImage.h
@@ -68,17 +68,17 @@ class D3D11YCbCrImage : public Image {
   // the image.
   bool SetData(KnowsCompositor* aAllocator, ImageContainer* aContainer,
                const PlanarYCbCrData& aData);
 
   gfx::IntSize GetSize() const override;
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
 
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   gfx::IntRect GetPictureRect() const override { return mPictureRect; }
 
  private:
   const DXGIYCbCrTextureData* GetData() const;
 
   gfx::IntSize mYSize;
   gfx::IntSize mCbCrSize;
--- a/gfx/layers/D3D9SurfaceImage.cpp
+++ b/gfx/layers/D3D9SurfaceImage.cpp
@@ -176,20 +176,21 @@ already_AddRefed<IDirect3DSurface9> D3D9
 
 const D3DSURFACE_DESC& D3D9SurfaceImage::GetDesc() const { return mDesc; }
 
 HANDLE
 D3D9SurfaceImage::GetShareHandle() const { return mShareHandle; }
 
 gfx::IntSize D3D9SurfaceImage::GetSize() const { return mSize; }
 
-TextureClient* D3D9SurfaceImage::GetTextureClient(KnowsCompositor* aForwarder) {
+TextureClient* D3D9SurfaceImage::GetTextureClient(
+    KnowsCompositor* aKnowsCompositor) {
   MOZ_ASSERT(mTextureClient);
   MOZ_ASSERT(mTextureClient->GetAllocator() ==
-             aForwarder->GetTextureForwarder());
+             aKnowsCompositor->GetTextureForwarder());
   return mTextureClient;
 }
 
 already_AddRefed<gfx::SourceSurface> D3D9SurfaceImage::GetAsSourceSurface() {
   if (!mTexture) {
     return nullptr;
   }
 
--- a/gfx/layers/D3D9SurfaceImage.h
+++ b/gfx/layers/D3D9SurfaceImage.h
@@ -94,17 +94,17 @@ class D3D9SurfaceImage : public Image {
 
   // Returns the description of the shared surface.
   const D3DSURFACE_DESC& GetDesc() const;
 
   gfx::IntSize GetSize() const override;
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
 
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   already_AddRefed<IDirect3DSurface9> GetD3D9Surface() const;
 
   HANDLE GetShareHandle() const;
 
   bool IsValid() const override { return mValid; }
 
   void Invalidate() { mValid = false; }
--- a/gfx/layers/GPUVideoImage.h
+++ b/gfx/layers/GPUVideoImage.h
@@ -63,18 +63,18 @@ class GPUVideoImage final : public Image
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override {
     GPUVideoTextureData* data = GetData();
     if (!data) {
       return nullptr;
     }
     return data->GetAsSourceSurface();
   }
 
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override {
-    MOZ_ASSERT(aForwarder == ImageBridgeChild::GetSingleton(),
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override {
+    MOZ_ASSERT(aKnowsCompositor == ImageBridgeChild::GetSingleton(),
                "Must only use GPUVideo on ImageBridge");
     return mTextureClient;
   }
 
  private:
   gfx::IntSize mSize;
   RefPtr<TextureClient> mTextureClient;
 };
--- a/gfx/layers/IMFYCbCrImage.cpp
+++ b/gfx/layers/IMFYCbCrImage.cpp
@@ -97,17 +97,17 @@ bool IMFYCbCrImage::CopyDataToTexture(co
     ctx->UpdateSubresource(textureCr, 0, &box, aData.mCrChannel,
                            aData.mCbCrStride, 0);
   }
 
   return true;
 }
 
 TextureClient* IMFYCbCrImage::GetD3D11TextureClient(
-    KnowsCompositor* aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
   if (!mAllocator) {
     return nullptr;
   }
 
   RefPtr<ID3D11Device> device = gfx::DeviceManagerDx::Get()->GetImageDevice();
   if (!device) {
     return nullptr;
   }
@@ -129,22 +129,23 @@ TextureClient* IMFYCbCrImage::GetD3D11Te
     // Failed to copy data
     mTextureClient = nullptr;
     return nullptr;
   }
 
   return mTextureClient;
 }
 
-TextureClient* IMFYCbCrImage::GetTextureClient(KnowsCompositor* aForwarder) {
+TextureClient* IMFYCbCrImage::GetTextureClient(
+    KnowsCompositor* aKnowsCompositor) {
   if (mTextureClient) {
     return mTextureClient;
   }
 
   RefPtr<ID3D11Device> device = gfx::DeviceManagerDx::Get()->GetImageDevice();
-  if (!device || !aForwarder->SupportsD3D11()) {
+  if (!device || !aKnowsCompositor->SupportsD3D11()) {
     return nullptr;
   }
-  return GetD3D11TextureClient(aForwarder);
+  return GetD3D11TextureClient(aKnowsCompositor);
 }
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/IMFYCbCrImage.h
+++ b/gfx/layers/IMFYCbCrImage.h
@@ -17,20 +17,20 @@ namespace layers {
 
 class IMFYCbCrImage : public RecyclingPlanarYCbCrImage {
  public:
   IMFYCbCrImage(IMFMediaBuffer* aBuffer, IMF2DBuffer* a2DBuffer,
                 KnowsCompositor* aKnowsCompositor, ImageContainer* aContainer);
 
   bool IsValid() const override { return true; }
 
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
  protected:
-  TextureClient* GetD3D11TextureClient(KnowsCompositor* aForwarder);
+  TextureClient* GetD3D11TextureClient(KnowsCompositor* aKnowsCompositor);
   static bool CopyDataToTexture(const Data& aData, ID3D11Device* aDevice,
                                 DXGIYCbCrTextureData* aTextureData);
 
   virtual ~IMFYCbCrImage();
 
   RefPtr<IMFMediaBuffer> mBuffer;
   RefPtr<IMF2DBuffer> m2DBuffer;
   RefPtr<D3D11YCbCrRecycleAllocator> mAllocator;
--- a/gfx/layers/ImageContainer.cpp
+++ b/gfx/layers/ImageContainer.cpp
@@ -759,37 +759,37 @@ SourceSurfaceImage::SourceSurfaceImage(g
     : Image(nullptr, ImageFormat::CAIRO_SURFACE),
       mSize(aSourceSurface->GetSize()),
       mSourceSurface(aSourceSurface),
       mTextureFlags(TextureFlags::DEFAULT) {}
 
 SourceSurfaceImage::~SourceSurfaceImage() = default;
 
 TextureClient* SourceSurfaceImage::GetTextureClient(
-    KnowsCompositor* aForwarder) {
-  if (!aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
+  if (!aKnowsCompositor) {
     return nullptr;
   }
 
-  auto entry = mTextureClients.LookupForAdd(aForwarder->GetSerial());
+  auto entry = mTextureClients.LookupForAdd(aKnowsCompositor->GetSerial());
   if (entry) {
     return entry.Data();
   }
 
   RefPtr<TextureClient> textureClient;
   RefPtr<SourceSurface> surface = GetAsSourceSurface();
   MOZ_ASSERT(surface);
   if (surface) {
     // gfx::BackendType::NONE means default to content backend
     textureClient = TextureClient::CreateFromSurface(
-        aForwarder, surface, BackendSelector::Content, mTextureFlags,
+        aKnowsCompositor, surface, BackendSelector::Content, mTextureFlags,
         ALLOC_DEFAULT);
   }
   if (textureClient) {
-    textureClient->SyncWithObject(aForwarder->GetSyncObject());
+    textureClient->SyncWithObject(aKnowsCompositor->GetSyncObject());
     entry.OrInsert([&textureClient]() { return textureClient; });
     return textureClient;
   }
 
   // Remove the speculatively added entry.
   entry.OrRemove();
   return nullptr;
 }
--- a/gfx/layers/ImageContainer.h
+++ b/gfx/layers/ImageContainer.h
@@ -216,17 +216,17 @@ class Image {
   virtual already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() = 0;
 
   virtual bool IsValid() const { return true; }
 
   /**
    * For use with the TextureForwarder only (so that the later can
    * synchronize the TextureClient with the TextureHost).
    */
-  virtual TextureClient* GetTextureClient(KnowsCompositor* aForwarder) {
+  virtual TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) {
     return nullptr;
   }
 
   /* Access to derived classes. */
   virtual GLImage* AsGLImage() { return nullptr; }
 #ifdef MOZ_WIDGET_ANDROID
   virtual SurfaceTextureImage* AsSurfaceTextureImage() { return nullptr; }
 #endif
@@ -939,17 +939,17 @@ class SourceSurfaceImage final : public 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override {
     RefPtr<gfx::SourceSurface> surface(mSourceSurface);
     return surface.forget();
   }
 
   void SetTextureFlags(TextureFlags aTextureFlags) {
     mTextureFlags = aTextureFlags;
   }
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   gfx::IntSize GetSize() const override { return mSize; }
 
   SourceSurfaceImage(const gfx::IntSize& aSize,
                      gfx::SourceSurface* aSourceSurface);
   explicit SourceSurfaceImage(gfx::SourceSurface* aSourceSurface);
   virtual ~SourceSurfaceImage();
 
--- a/gfx/layers/MacIOSurfaceImage.cpp
+++ b/gfx/layers/MacIOSurfaceImage.cpp
@@ -12,21 +12,21 @@
 #include "mozilla/layers/MacIOSurfaceTextureClientOGL.h"
 #include "mozilla/UniquePtr.h"
 
 using namespace mozilla;
 using namespace mozilla::layers;
 using namespace mozilla::gfx;
 
 TextureClient* MacIOSurfaceImage::GetTextureClient(
-    KnowsCompositor* aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
   if (!mTextureClient) {
     BackendType backend = BackendType::NONE;
     mTextureClient = TextureClient::CreateWithData(
         MacIOSurfaceTextureData::Create(mSurface, backend),
-        TextureFlags::DEFAULT, aForwarder->GetTextureForwarder());
+        TextureFlags::DEFAULT, aKnowsCompositor->GetTextureForwarder());
   }
   return mTextureClient;
 }
 
 already_AddRefed<SourceSurface> MacIOSurfaceImage::GetAsSourceSurface() {
   return CreateSourceSurfaceFromMacIOSurface(mSurface);
 }
--- a/gfx/layers/MacIOSurfaceImage.h
+++ b/gfx/layers/MacIOSurfaceImage.h
@@ -25,17 +25,17 @@ class MacIOSurfaceImage : public Image {
 
   gfx::IntSize GetSize() const override {
     return gfx::IntSize::Truncate(mSurface->GetDevicePixelWidth(),
                                   mSurface->GetDevicePixelHeight());
   }
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
 
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   MacIOSurfaceImage* AsMacIOSurfaceImage() override { return this; }
 
  private:
   RefPtr<MacIOSurface> mSurface;
   RefPtr<TextureClient> mTextureClient;
 };
 
--- a/gfx/layers/TextureWrapperImage.cpp
+++ b/gfx/layers/TextureWrapperImage.cpp
@@ -36,14 +36,14 @@ already_AddRefed<gfx::SourceSurface> Tex
   if (!dt) {
     return nullptr;
   }
 
   return dt->Snapshot();
 }
 
 TextureClient* TextureWrapperImage::GetTextureClient(
-    KnowsCompositor* aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
   return mTextureClient;
 }
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/TextureWrapperImage.h
+++ b/gfx/layers/TextureWrapperImage.h
@@ -19,17 +19,17 @@ namespace layers {
 class TextureWrapperImage final : public Image {
  public:
   TextureWrapperImage(TextureClient* aClient, const gfx::IntRect& aPictureRect);
   virtual ~TextureWrapperImage();
 
   gfx::IntSize GetSize() const override;
   gfx::IntRect GetPictureRect() const override;
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
  private:
   gfx::IntRect mPictureRect;
   RefPtr<TextureClient> mTextureClient;
 };
 
 }  // namespace layers
 }  // namespace mozilla
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -91,44 +91,47 @@ void ImageClientSingle::FlushAllImages()
     // generate a frame before the texture gets cleared.
     RemoveTexture(b.mTextureClient, Some(wr::RenderRoot::Default));
   }
   mBuffers.Clear();
 }
 
 /* static */
 already_AddRefed<TextureClient> ImageClient::CreateTextureClientForImage(
-    Image* aImage, KnowsCompositor* aForwarder, ImageContainer* aContainer) {
+    Image* aImage, KnowsCompositor* aKnowsCompositor,
+    ImageContainer* aContainer) {
   RefPtr<TextureClient> texture;
   if (aImage->GetFormat() == ImageFormat::PLANAR_YCBCR) {
     PlanarYCbCrImage* ycbcr = static_cast<PlanarYCbCrImage*>(aImage);
     const PlanarYCbCrData* data = ycbcr->GetData();
     if (!data) {
       return nullptr;
     }
 
 #if XP_WIN
     // We disable this code path on Windows version earlier of Windows 8 due to
     // intermittent crashes with old drivers. See bug 1405110.
     // DXGIYCbCrTextureData can only handle YCbCr images using 3 non-interleaved
     // planes non-zero mSkip value indicates that one of the plane would be
     // interleaved.
-    if (IsWin8OrLater() && XRE_IsContentProcess() && aForwarder &&
-        aForwarder->SupportsD3D11() && aForwarder->GetTextureForwarder() &&
-        aForwarder->GetTextureForwarder()->UsesImageBridge() && aContainer &&
-        data->mYSkip == 0 && data->mCbSkip == 0 && data->mCrSkip == 0) {
+    if (IsWin8OrLater() && XRE_IsContentProcess() && aKnowsCompositor &&
+        aKnowsCompositor->SupportsD3D11() &&
+        aKnowsCompositor->GetTextureForwarder() &&
+        aKnowsCompositor->GetTextureForwarder()->UsesImageBridge() &&
+        aContainer && data->mYSkip == 0 && data->mCbSkip == 0 &&
+        data->mCrSkip == 0) {
       texture = D3D11YCbCrImage::CreateAndCopyDataToDXGIYCbCrTextureData(
-          aForwarder, aContainer, *data);
+          aKnowsCompositor, aContainer, *data);
       if (texture) {
         return texture.forget();
       }
     }
 #endif
     texture = TextureClient::CreateForYCbCr(
-        aForwarder, data->mYSize, data->mYStride, data->mCbCrSize,
+        aKnowsCompositor, data->mYSize, data->mYStride, data->mCbCrSize,
         data->mCbCrStride, data->mStereoMode, data->mColorDepth,
         data->mYUVColorSpace, TextureFlags::DEFAULT);
     if (!texture) {
       return nullptr;
     }
 
     TextureClientAutoLock autoLock(texture, OpenMode::OPEN_WRITE_ONLY);
     if (!autoLock.Succeeded()) {
@@ -142,23 +145,23 @@ already_AddRefed<TextureClient> ImageCli
     }
 #ifdef MOZ_WIDGET_ANDROID
   } else if (aImage->GetFormat() == ImageFormat::SURFACE_TEXTURE) {
     gfx::IntSize size = aImage->GetSize();
     SurfaceTextureImage* typedImage = aImage->AsSurfaceTextureImage();
     texture = AndroidSurfaceTextureData::CreateTextureClient(
         typedImage->GetHandle(), size, typedImage->GetContinuous(),
         typedImage->GetOriginPos(), typedImage->GetHasAlpha(),
-        aForwarder->GetTextureForwarder(), TextureFlags::DEFAULT);
+        aKnowsCompositor->GetTextureForwarder(), TextureFlags::DEFAULT);
 #endif
   } else {
     RefPtr<gfx::SourceSurface> surface = aImage->GetAsSourceSurface();
     MOZ_ASSERT(surface);
     texture = TextureClient::CreateForDrawing(
-        aForwarder, surface->GetFormat(), aImage->GetSize(),
+        aKnowsCompositor, surface->GetFormat(), aImage->GetSize(),
         BackendSelector::Content, TextureFlags::DEFAULT);
     if (!texture) {
       return nullptr;
     }
 
     MOZ_ASSERT(texture->CanExposeDrawTarget());
 
     if (!texture->Lock(OpenMode::OPEN_WRITE_ONLY)) {
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -923,21 +923,21 @@ bool TextureClient::InitIPDLActor(Compos
   // mutex since it will be unlocked in TextureClient::Unlock.
   if (mIsLocked) {
     LockActor();
   }
 
   return mActor->IPCOpen();
 }
 
-bool TextureClient::InitIPDLActor(KnowsCompositor* aForwarder) {
-  MOZ_ASSERT(aForwarder &&
-             aForwarder->GetTextureForwarder()->GetMessageLoop() ==
+bool TextureClient::InitIPDLActor(KnowsCompositor* aKnowsCompositor) {
+  MOZ_ASSERT(aKnowsCompositor &&
+             aKnowsCompositor->GetTextureForwarder()->GetMessageLoop() ==
                  mAllocator->GetMessageLoop());
-  TextureForwarder* fwd = aForwarder->GetTextureForwarder();
+  TextureForwarder* fwd = aKnowsCompositor->GetTextureForwarder();
   if (mActor && !mActor->mDestroyed) {
     CompositableForwarder* currentFwd = mActor->mCompositableForwarder;
     TextureForwarder* currentTexFwd = mActor->mTextureForwarder;
 
     if (currentFwd) {
       gfxCriticalError()
           << "Attempt to remove a texture from a CompositableForwarder.";
       return false;
@@ -956,30 +956,30 @@ bool TextureClient::InitIPDLActor(KnowsC
 
   SurfaceDescriptor desc;
   if (!ToSurfaceDescriptor(desc)) {
     return false;
   }
 
   // Try external image id allocation.
   mExternalImageId =
-      aForwarder->GetTextureForwarder()->GetNextExternalImageId();
+      aKnowsCompositor->GetTextureForwarder()->GetNextExternalImageId();
 
   ReadLockDescriptor readLockDescriptor = null_t();
   if (mReadLock) {
     mReadLock->Serialize(readLockDescriptor, GetAllocator()->GetParentPid());
   }
 
   PTextureChild* actor = fwd->CreateTexture(
-      desc, readLockDescriptor, aForwarder->GetCompositorBackendType(),
+      desc, readLockDescriptor, aKnowsCompositor->GetCompositorBackendType(),
       GetFlags(), mSerial, mExternalImageId);
   if (!actor) {
     gfxCriticalNote << static_cast<int32_t>(desc.type()) << ", "
                     << static_cast<int32_t>(
-                           aForwarder->GetCompositorBackendType())
+                           aKnowsCompositor->GetCompositorBackendType())
                     << ", " << static_cast<uint32_t>(GetFlags()) << ", "
                     << mSerial;
     return false;
   }
 
   mActor = static_cast<TextureChild*>(actor);
   mActor->mTextureForwarder = fwd;
   mActor->mTextureClient = this;
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -535,17 +535,17 @@ class TextureClient : public AtomicRefCo
 
   /**
    * Create and init the TextureChild/Parent IPDL actor pair
    * with a TextureForwarder.
    *
    * Should be called only once per TextureClient.
    * The TextureClient must not be locked when calling this method.
    */
-  bool InitIPDLActor(KnowsCompositor* aForwarder);
+  bool InitIPDLActor(KnowsCompositor* aKnowsCompositor);
 
   /**
    * Return a pointer to the IPDLActor.
    *
    * This is to be used with IPDL messages only. Do not store the returned
    * pointer.
    */
   PTextureChild* GetIPDLActor();
--- a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
+++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
@@ -42,17 +42,17 @@ size_t SharedPlanarYCbCrImage::SizeOfExc
   // NB: Explicitly skipping mTextureClient, the memory is already reported
   //     at time of allocation in GfxMemoryImageReporter.
   // Not owned:
   // - mCompositable
   return 0;
 }
 
 TextureClient* SharedPlanarYCbCrImage::GetTextureClient(
-    KnowsCompositor* aForwarder) {
+    KnowsCompositor* aKnowsCompositor) {
   return mTextureClient.get();
 }
 
 already_AddRefed<gfx::SourceSurface>
 SharedPlanarYCbCrImage::GetAsSourceSurface() {
   if (!IsValid()) {
     NS_WARNING("Can't get as surface");
     return nullptr;
--- a/gfx/layers/ipc/SharedPlanarYCbCrImage.h
+++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.h
@@ -25,17 +25,17 @@ class TextureClient;
 class SharedPlanarYCbCrImage : public PlanarYCbCrImage {
  public:
   explicit SharedPlanarYCbCrImage(ImageClient* aCompositable);
 
  protected:
   virtual ~SharedPlanarYCbCrImage();
 
  public:
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
   bool CopyData(const PlanarYCbCrData& aData) override;
   bool AdoptData(const Data& aData) override;
 
   bool Allocate(PlanarYCbCrData& aData);
 
   bool IsValid() const override;
--- a/gfx/layers/ipc/SharedRGBImage.cpp
+++ b/gfx/layers/ipc/SharedRGBImage.cpp
@@ -99,17 +99,18 @@ bool SharedRGBImage::Allocate(gfx::IntSi
         mCompositable->GetTextureClientRecycler()->CreateOrRecycle(helper);
   }
 
   return !!mTextureClient;
 }
 
 gfx::IntSize SharedRGBImage::GetSize() const { return mSize; }
 
-TextureClient* SharedRGBImage::GetTextureClient(KnowsCompositor* aForwarder) {
+TextureClient* SharedRGBImage::GetTextureClient(
+    KnowsCompositor* aKnowsCompositor) {
   return mTextureClient.get();
 }
 
 static void ReleaseTextureClient(void* aData) {
   RELEASE_MANUALLY(static_cast<TextureClient*>(aData));
 }
 
 static gfx::UserDataKey sTextureClientKey;
--- a/gfx/layers/ipc/SharedRGBImage.h
+++ b/gfx/layers/ipc/SharedRGBImage.h
@@ -34,17 +34,17 @@ already_AddRefed<Image> CreateSharedRGBI
 class SharedRGBImage : public Image {
  public:
   explicit SharedRGBImage(ImageClient* aCompositable);
 
  protected:
   virtual ~SharedRGBImage();
 
  public:
-  TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
+  TextureClient* GetTextureClient(KnowsCompositor* aKnowsCompositor) override;
 
   gfx::IntSize GetSize() const override;
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
 
   bool Allocate(gfx::IntSize aSize, gfx::SurfaceFormat aFormat);
 
  private: