Bug 1250873 - Rename HasInternalBuffer into HasIntermediateBuffer in layers. r=sotaro
authorNicolas Silva <nsilva@mozilla.com>
Thu, 25 Feb 2016 14:15:58 +0100
changeset 321908 aa348994df48dd1ab2216b9f13473c6a6049ec9f
parent 321907 52e355f34371182f6011a05da6a6d3ccecd03c77
child 321909 c167859aa1f5a4d8c3ce76c5d841eabdbce59241
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1250873
milestone47.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 1250873 - Rename HasInternalBuffer into HasIntermediateBuffer in layers. r=sotaro
gfx/layers/BufferTexture.cpp
gfx/layers/BufferTexture.h
gfx/layers/TextureDIB.h
gfx/layers/basic/TextureClientX11.h
gfx/layers/client/SingleTiledContentClient.cpp
gfx/layers/client/TextureClient.cpp
gfx/layers/client/TextureClient.h
gfx/layers/client/TextureClientSharedSurface.h
gfx/layers/client/TiledContentClient.cpp
gfx/layers/composite/ImageHost.cpp
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/TextureHost.h
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/d3d11/TextureD3D11.h
gfx/layers/d3d9/TextureD3D9.h
gfx/layers/ipc/LayersSurfaces.ipdlh
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/opengl/GrallocTextureClient.h
gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h
gfx/layers/opengl/TextureClientOGL.h
--- a/gfx/layers/BufferTexture.cpp
+++ b/gfx/layers/BufferTexture.cpp
@@ -201,22 +201,22 @@ BufferTextureData::GetSize() const
 gfx::SurfaceFormat
 BufferTextureData::GetFormat() const
 {
   return ImageDataSerializer::FormatFromBufferDescriptor(mDescriptor);
 }
 
 
 bool
-BufferTextureData::HasInternalBuffer() const
+BufferTextureData::HasIntermediateBuffer() const
 {
   if (mDescriptor.type() == BufferDescriptor::TYCbCrDescriptor) {
     return true;
   }
-  return mDescriptor.get_RGBDescriptor().hasInternalBuffer();
+  return mDescriptor.get_RGBDescriptor().hasIntermediateBuffer();
 }
 
 bool
 BufferTextureData::SupportsMoz2D() const
 {
   switch (GetFormat()) {
     case gfx::SurfaceFormat::YUV:
     case gfx::SurfaceFormat::NV12:
@@ -436,23 +436,23 @@ MemoryTextureData::Create(gfx::IntSize a
   }
 
   uint8_t* buf = new (fallible) uint8_t[bufSize];
   if (!InitBuffer(buf, bufSize, aAllocFlags)) {
     return nullptr;
   }
 
   auto fwd = aAllocator ? aAllocator->AsCompositableForwarder() : nullptr;
-  bool hasInternalBuffer = fwd ? ComputeHasIntermediateBuffer(aFormat,
+  bool hasIntermediateBuffer = fwd ? ComputeHasIntermediateBuffer(aFormat,
                                               fwd->GetCompositorBackendType())
-                               : true;
+                                   : true;
 
   GfxMemoryImageReporter::DidAlloc(buf);
 
-  BufferDescriptor descriptor = RGBDescriptor(aSize, aFormat, hasInternalBuffer);
+  BufferDescriptor descriptor = RGBDescriptor(aSize, aFormat, hasIntermediateBuffer);
 
   return new MemoryTextureData(descriptor, aMoz2DBackend, buf, bufSize);
 }
 
 void
 MemoryTextureData::Deallocate(ISurfaceAllocator*)
 {
   MOZ_ASSERT(mBuffer);
@@ -513,21 +513,21 @@ ShmemTextureData::Create(gfx::IntSize aS
   }
 
   uint8_t* buf = shm.get<uint8_t>();
   if (!InitBuffer(buf, bufSize, aAllocFlags)) {
     return nullptr;
   }
 
   auto fwd = aAllocator->AsCompositableForwarder();
-  bool hasInternalBuffer = fwd ? ComputeHasIntermediateBuffer(aFormat,
+  bool hasIntermediateBuffer = fwd ? ComputeHasIntermediateBuffer(aFormat,
                                               fwd->GetCompositorBackendType())
-                               : true;
+                                   : true;
 
-  BufferDescriptor descriptor = RGBDescriptor(aSize, aFormat, hasInternalBuffer);
+  BufferDescriptor descriptor = RGBDescriptor(aSize, aFormat, hasIntermediateBuffer);
 
   return new ShmemTextureData(descriptor, aMoz2DBackend, shm);
 
   return nullptr;
 }
 
 TextureData*
 ShmemTextureData::CreateSimilar(ISurfaceAllocator* aAllocator,
--- a/gfx/layers/BufferTexture.h
+++ b/gfx/layers/BufferTexture.h
@@ -50,17 +50,17 @@ public:
   virtual bool CanExposeMappedData() const override { return true; }
 
   virtual bool BorrowMappedData(MappedTextureData& aMap) override;
 
   virtual bool BorrowMappedYCbCrData(MappedYCbCrTextureData& aMap) override;
 
   virtual bool SupportsMoz2D() const override;
 
-  virtual bool HasInternalBuffer() const override;
+  virtual bool HasIntermediateBuffer() const override;
 
   // use TextureClient's default implementation
   virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
 
   // Don't use this.
   void SetDesciptor(const BufferDescriptor& aDesc);
 
 protected:
--- a/gfx/layers/TextureDIB.h
+++ b/gfx/layers/TextureDIB.h
@@ -25,17 +25,17 @@ public:
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
 
   virtual bool SupportsMoz2D() const override { return true; }
 
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
 
-  virtual bool HasInternalBuffer() const override { return true; }
+  virtual bool HasIntermediateBuffer() const override { return true; }
 
   static
   DIBTextureData* Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
                          ISurfaceAllocator* aAllocator);
 
 protected:
   DIBTextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
                  gfxWindowsSurface* aSurface)
@@ -75,17 +75,17 @@ public:
   virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual bool Lock() override;
 
   virtual void Unlock() override;
 
-  virtual bool HasInternalBuffer() const { return true; }
+  virtual bool HasIntermediateBuffer() const { return true; }
 
   virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override;
 
 protected:
   RefPtr<DataTextureSource> mTextureSource;
   RefPtr<Compositor> mCompositor;
   gfx::SurfaceFormat mFormat;
   gfx::IntSize mSize;
--- a/gfx/layers/basic/TextureClientX11.h
+++ b/gfx/layers/basic/TextureClientX11.h
@@ -28,17 +28,17 @@ public:
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
 
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
 
   virtual bool SupportsMoz2D() const override { return true; }
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual void Deallocate(ISurfaceAllocator*) override;
 
   virtual TextureData*
   CreateSimilar(ISurfaceAllocator* aAllocator,
                 TextureFlags aFlags = TextureFlags::DEFAULT,
                 TextureAllocationFlags aAllocFlags = ALLOC_DEFAULT) const override;
 
--- a/gfx/layers/client/SingleTiledContentClient.cpp
+++ b/gfx/layers/client/SingleTiledContentClient.cpp
@@ -198,17 +198,17 @@ ClientSingleTiledLayerBuffer::PaintThebe
   // The new buffer is now validated, remove the dirty region from it.
   mTile.mInvalidBack.SubOut(tileDirtyRegion);
 
   dt = nullptr;
 
   mTile.Flip();
   UnlockTile(mTile);
 
-  if (backBuffer->HasInternalBuffer()) {
+  if (backBuffer->HasIntermediateBuffer()) {
     // If our new buffer has an internal buffer, we don't want to keep another
     // TextureClient around unnecessarily, so discard the back-buffer.
     mTile.DiscardBackBuffer();
   }
 
   mValidRegion = aNewValidRegion;
   mLastPaintSurfaceMode = mode;
   mLastPaintContentType = content;
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -422,20 +422,20 @@ TextureClient::Unlock()
   }
 
   mData->Unlock();
   mIsLocked = false;
   mOpenMode = OpenMode::OPEN_NONE;
 }
 
 bool
-TextureClient::HasInternalBuffer() const
+TextureClient::HasIntermediateBuffer() const
 {
   MOZ_ASSERT(IsValid());
-  return mData->HasInternalBuffer();
+  return mData->HasIntermediateBuffer();
 }
 
 gfx::IntSize
 TextureClient::GetSize() const
 {
   MOZ_ASSERT(IsValid());
   return mData->GetSize();
 }
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -188,17 +188,17 @@ public:
   virtual bool Lock(OpenMode aMode, FenceHandle* aFence) = 0;
 
   virtual void Unlock() = 0;
 
   virtual bool SupportsMoz2D() const { return false; }
 
   virtual bool CanExposeMappedData() const { return false; }
 
-  virtual bool HasInternalBuffer() const = 0;
+  virtual bool HasIntermediateBuffer() const = 0;
 
   virtual bool HasSynchronization() const { return false; }
 
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() { return nullptr; }
 
   virtual bool BorrowMappedData(MappedTextureData&) { return false; }
 
   virtual bool BorrowMappedYCbCrData(MappedYCbCrTextureData&) { return false; }
@@ -408,17 +408,17 @@ public:
    */
   bool HasSynchronization() const { return false; }
 
   /**
    * Indicates whether the TextureClient implementation is backed by an
    * in-memory buffer. The consequence of this is that locking the
    * TextureClient does not contend with locking the texture on the host side.
    */
-  bool HasInternalBuffer() const;
+  bool HasIntermediateBuffer() const;
 
   /**
    * Allocate and deallocate a TextureChild actor.
    *
    * TextureChild is an implementation detail of TextureClient that is not
    * exposed to the rest of the code base. CreateIPDLActor and DestroyIPDLActor
    * are for use with the managing IPDL protocols only (so that they can
    * implement AllocPextureChild and DeallocPTextureChild).
--- a/gfx/layers/client/TextureClientSharedSurface.h
+++ b/gfx/layers/client/TextureClientSharedSurface.h
@@ -39,17 +39,17 @@ protected:
 public:
 
   ~SharedSurfaceTextureData();
 
   virtual bool Lock(OpenMode, FenceHandle*) override { return false; }
 
   virtual void Unlock() override {}
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual gfx::SurfaceFormat GetFormat() const override {
     return gfx::SurfaceFormat::UNKNOWN;
   }
 
   virtual gfx::IntSize GetSize() const override;
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -720,17 +720,17 @@ TileClient::GetBackBuffer(const nsIntReg
                           gfxContentType aContent,
                           SurfaceMode aMode,
                           nsIntRegion& aAddPaintedRegion,
                           RefPtr<TextureClient>* aBackBufferOnWhite)
 {
   // Try to re-use the front-buffer if possible
   bool createdTextureClient = false;
   if (mFrontBuffer &&
-      mFrontBuffer->HasInternalBuffer() &&
+      mFrontBuffer->HasIntermediateBuffer() &&
       mFrontLock->GetReadCount() == 1 &&
       !(aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA && !mFrontBufferOnWhite)) {
     // If we had a backbuffer we no longer care about it since we'll
     // re-use the front buffer.
     DiscardBackBuffer();
     Flip();
   } else {
     if (!mBackBuffer ||
@@ -1357,17 +1357,17 @@ ClientMultiTiledLayerBuffer::ValidateTil
 
   backBuffer->SetWaste(tileRegion.Area() * mResolution * mResolution);
 
   aTile.Flip();
 
   // Note, we don't call UpdatedTexture. The Updated function is called manually
   // by the TiledContentHost before composition.
 
-  if (backBuffer->HasInternalBuffer()) {
+  if (backBuffer->HasIntermediateBuffer()) {
     // If our new buffer has an internal buffer, we don't want to keep another
     // TextureClient around unnecessarily, so discard the back-buffer.
     aTile.DiscardBackBuffer();
   }
 
   return true;
 }
 
--- a/gfx/layers/composite/ImageHost.cpp
+++ b/gfx/layers/composite/ImageHost.cpp
@@ -103,17 +103,17 @@ ImageHost::UseTextureHost(const nsTArray
 void
 ImageHost::SetCurrentTextureHost(TextureHost* aTexture)
 {
   if (aTexture == mCurrentTextureHost.get()) {
     return;
   }
 
   bool swapTextureSources = !!mCurrentTextureHost && !!mCurrentTextureSource
-                            && mCurrentTextureHost->HasInternalBuffer();
+                            && mCurrentTextureHost->HasIntermediateBuffer();
 
   if (swapTextureSources) {
     auto dataSource = mCurrentTextureSource->AsDataTextureSource();
     if (dataSource) {
       // The current textureHost has an internal buffer in the form of the
       // DataTextureSource. Removing the ownership of the texture source
       // will enable the next texture host we bind to the texture source to
       // acquire it instead of creating a new one. This is desirable in
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -390,24 +390,24 @@ BufferTextureHost::BufferTextureHost(con
 , mNeedsFullUpdate(false)
 {
   mDescriptor = aDesc;
   switch (mDescriptor.type()) {
     case BufferDescriptor::TYCbCrDescriptor: {
       const YCbCrDescriptor& ycbcr = mDescriptor.get_YCbCrDescriptor();
       mSize = ycbcr.ySize();
       mFormat = gfx::SurfaceFormat::YUV;
-      mHasInternalBuffer = true;
+      mHasIntermediateBuffer = true;
       break;
     }
     case BufferDescriptor::TRGBDescriptor: {
       const RGBDescriptor& rgb = mDescriptor.get_RGBDescriptor();
       mSize = rgb.size();
       mFormat = rgb.format();
-      mHasInternalBuffer = rgb.hasInternalBuffer();
+      mHasIntermediateBuffer = rgb.hasIntermediateBuffer();
       break;
     }
     default: MOZ_CRASH();
   }
   if (aFlags & TextureFlags::COMPONENT_ALPHA) {
     // One texture of a component alpha texture pair will start out all white.
     // This hack allows us to easily make sure that white will be uploaded.
     // See bug 1138934
@@ -491,17 +491,17 @@ BufferTextureHost::Unlock()
 {
   MOZ_ASSERT(mLocked);
   mLocked = false;
 }
 
 bool
 BufferTextureHost::EnsureWrappingTextureSource()
 {
-  MOZ_ASSERT(!mHasInternalBuffer);
+  MOZ_ASSERT(!mHasIntermediateBuffer);
   MOZ_ASSERT(mFormat != gfx::SurfaceFormat::YUV);
 
   if (mFirstSource) {
     return true;
   }
 
   if (!mCompositor) {
     return false;
@@ -520,17 +520,17 @@ BufferTextureHost::EnsureWrappingTexture
   mFirstSource->SetOwner(this);
 
   return true;
 }
 
 void
 BufferTextureHost::PrepareTextureSource(CompositableTextureSourceRef& aTexture)
 {
-  if (!mHasInternalBuffer) {
+  if (!mHasIntermediateBuffer) {
     EnsureWrappingTextureSource();
   }
 
   if (mFirstSource && mFirstSource->IsOwnedBy(this)) {
     // We are already attached to a TextureSource, nothing to do except tell
     // the compositable to use it.
     aTexture = mFirstSource.get();
     return;
@@ -624,17 +624,17 @@ BufferTextureHost::Upload(nsIntRegion *a
     // deserializing it.
     return false;
   }
   if (!mCompositor) {
     // This can happen if we send textures to a compositable that isn't yet
     // attached to a layer.
     return false;
   }
-  if (!mHasInternalBuffer && EnsureWrappingTextureSource()) {
+  if (!mHasIntermediateBuffer && EnsureWrappingTextureSource()) {
     return true;
   }
 
   if (mFormat == gfx::SurfaceFormat::UNKNOWN) {
     NS_WARNING("BufferTextureHost: unsupported format!");
     return false;
   } else if (mFormat == gfx::SurfaceFormat::YUV) {
     const YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
--- a/gfx/layers/composite/TextureHost.h
+++ b/gfx/layers/composite/TextureHost.h
@@ -525,17 +525,17 @@ public:
   virtual const char *Name() { return "TextureHost"; }
   virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
 
   /**
    * Indicates whether the TextureHost implementation is backed by an
    * in-memory buffer. The consequence of this is that locking the
    * TextureHost does not contend with locking the texture on the client side.
    */
-  virtual bool HasInternalBuffer() const { return false; }
+  virtual bool HasIntermediateBuffer() const { return false; }
 
   void AddCompositableRef() { ++mCompositableCount; }
 
   void ReleaseCompositableRef()
   {
     --mCompositableCount;
     MOZ_ASSERT(mCompositableCount >= 0);
     if (mCompositableCount == 0) {
@@ -625,17 +625,17 @@ public:
    * GetFormat will be RGB32 (even though mFormat is SurfaceFormat::YUV).
    */
   virtual gfx::SurfaceFormat GetFormat() const override;
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override;
 
-  virtual bool HasInternalBuffer() const override { return mHasInternalBuffer; }
+  virtual bool HasIntermediateBuffer() const override { return mHasIntermediateBuffer; }
 
 protected:
   bool Upload(nsIntRegion *aRegion = nullptr);
   bool MaybeUpload(nsIntRegion *aRegion = nullptr);
   bool EnsureWrappingTextureSource();
 
   virtual void UpdatedInternal(const nsIntRegion* aRegion = nullptr) override;
 
@@ -643,17 +643,17 @@ protected:
   RefPtr<Compositor> mCompositor;
   RefPtr<DataTextureSource> mFirstSource;
   nsIntRegion mMaybeUpdatedRegion;
   gfx::IntSize mSize;
   gfx::SurfaceFormat mFormat;
   uint32_t mUpdateSerial;
   bool mLocked;
   bool mNeedsFullUpdate;
-  bool mHasInternalBuffer;
+  bool mHasIntermediateBuffer;
 };
 
 /**
  * TextureHost that wraps shared memory.
  * the corresponding texture on the client side is ShmemTextureClient.
  * This TextureHost is backend-independent.
  */
 class ShmemTextureHost : public BufferTextureHost
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -144,17 +144,17 @@ UseTileTexture(CompositableTextureHostRe
 
   if (!aUpdateRect.IsEmpty()) {
 #ifdef MOZ_GFX_OPTIMIZE_MOBILE
     aTexture->Updated(nullptr);
 #else
     // We possibly upload the entire texture contents here. This is a purposeful
     // decision, as sub-image upload can often be slow and/or unreliable, but
     // we may want to reevaluate this in the future.
-    // For !HasInternalBuffer() textures, this is likely a no-op.
+    // For !HasIntermediateBuffer() textures, this is likely a no-op.
     nsIntRegion region = aUpdateRect;
     aTexture->Updated(&region);
 #endif
   }
 
   aTexture->PrepareTextureSource(aTextureSource);
 }
 
@@ -362,17 +362,17 @@ TiledLayerBufferComposite::UseTiles(cons
 
     if (tile.mTextureHostOnWhite) {
       UseTileTexture(tile.mTextureHostOnWhite,
                      tile.mTextureSourceOnWhite,
                      texturedDesc.updateRect(),
                      aCompositor);
     }
 
-    if (tile.mTextureHost->HasInternalBuffer()) {
+    if (tile.mTextureHost->HasIntermediateBuffer()) {
       // Now that we did the texture upload (in UseTileTexture), we can release
       // the lock.
       tile.ReadUnlock();
     }
   }
 
   mTiles = newTiles;
   mTileSize = aTiles.tileSize();
--- a/gfx/layers/d3d11/TextureD3D11.h
+++ b/gfx/layers/d3d11/TextureD3D11.h
@@ -25,17 +25,17 @@ class DXGITextureData : public TextureDa
 {
 public:
   virtual gfx::IntSize GetSize() const override { return mSize; }
  
   virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
  
   virtual bool SupportsMoz2D() const override { return true; }
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual bool HasSynchronization() const override { return mHasSynchronization; }
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescrptor) override;
 
   static DXGITextureData*
   Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, TextureAllocationFlags aFlags);
 
@@ -137,17 +137,17 @@ public:
 
   virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
 
   virtual void Unlock() override {}
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
 
   // TODO - DXGIYCbCrTextureClient returned true but that looks like a mistake
-  virtual bool HasInternalBuffer() const override{ return false; }
+  virtual bool HasIntermediateBuffer() const override{ return false; }
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual gfx::SurfaceFormat GetFormat() const override { return gfx::SurfaceFormat::YUV; }
 
   virtual bool SupportsMoz2D() const override { return false; }
 
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override { return nullptr; }
--- a/gfx/layers/d3d9/TextureD3D9.h
+++ b/gfx/layers/d3d9/TextureD3D9.h
@@ -179,17 +179,17 @@ protected:
  */
 class D3D9TextureData : public TextureData
 {
 public:
   ~D3D9TextureData();
 
   virtual bool SupportsMoz2D() const override { return true; }
 
-  virtual bool HasInternalBuffer() const override { return true; }
+  virtual bool HasIntermediateBuffer() const override { return true; }
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescrptor) override;
 
   virtual bool Lock(OpenMode aMode, FenceHandle*) override;
 
   virtual void Unlock() override;
 
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
@@ -241,17 +241,17 @@ public:
   virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
 
   virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
 
   virtual void Unlock() override {}
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual void Deallocate(ISurfaceAllocator* aAllocator) override {}
 
   IDirect3DDevice9* GetD3D9Device() { return mDevice; }
   IDirect3DTexture9* GetD3D9Texture() { return mTexture; }
   HANDLE GetShareHandle() const { return mHandle; }
   already_AddRefed<IDirect3DSurface9> GetD3D9Surface() const;
 
@@ -292,17 +292,17 @@ public:
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override
   {
     return nullptr;
   }
 
-  virtual bool HasInternalBuffer() const override { return true; }
+  virtual bool HasIntermediateBuffer() const override { return true; }
 
 protected:
   TextureHostD3D9(TextureFlags aFlags);
   IDirect3DDevice9* GetDevice();
 
   virtual void UpdatedInternal(const nsIntRegion* aRegion) override;
 
   RefPtr<DataTextureSourceD3D9> mTextureSource;
--- a/gfx/layers/ipc/LayersSurfaces.ipdlh
+++ b/gfx/layers/ipc/LayersSurfaces.ipdlh
@@ -96,17 +96,17 @@ struct SurfaceDescriptorSharedGLTexture 
 struct SurfaceDescriptorGralloc {
   MaybeMagicGrallocBufferHandle buffer;
   bool isOpaque;
 };
 
 struct RGBDescriptor {
   IntSize size;
   SurfaceFormat format;
-  bool hasInternalBuffer;
+  bool hasIntermediateBuffer;
 };
 
 struct YCbCrDescriptor {
   IntSize ySize;
   IntSize cbCrSize;
   uint32_t yOffset;
   uint32_t cbOffset;
   uint32_t crOffset;
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -410,17 +410,17 @@ ShadowLayerForwarder::UseTextures(Compos
     MOZ_ASSERT(t.mTextureClient);
     MOZ_ASSERT(t.mTextureClient->GetIPDLActor());
     FenceHandle fence = t.mTextureClient->GetAcquireFenceHandle();
     textures.AppendElement(TimedTexture(nullptr, t.mTextureClient->GetIPDLActor(),
                                         fence.IsValid() ? MaybeFence(fence) : MaybeFence(null_t()),
                                         t.mTimeStamp, t.mPictureRect,
                                         t.mFrameID, t.mProducerID, t.mInputFrameID));
     if ((t.mTextureClient->GetFlags() & TextureFlags::IMMEDIATE_UPLOAD)
-        && t.mTextureClient->HasInternalBuffer()) {
+        && t.mTextureClient->HasIntermediateBuffer()) {
 
       // We use IMMEDIATE_UPLOAD when we want to be sure that the upload cannot
       // race with updates on the main thread. In this case we want the transaction
       // to be synchronous.
       mTxn->MarkSyncTransaction();
     }
   }
   mTxn->AddEdit(OpUseTexture(nullptr, aCompositable->GetIPDLActor(),
--- a/gfx/layers/opengl/GrallocTextureClient.h
+++ b/gfx/layers/opengl/GrallocTextureClient.h
@@ -53,17 +53,17 @@ public:
   virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
 
   virtual bool CanExposeMappedData() const override { return true; }
 
   virtual bool BorrowMappedData(MappedTextureData& aMap) override;
 
   virtual bool SupportsMoz2D() const override { return true; }
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual bool HasSynchronization() const override { return true; }
 
   virtual void Deallocate(ISurfaceAllocator*) override;
 
   virtual void Forget(ISurfaceAllocator*) override;
 
   static GrallocTextureData* CreateForDrawing(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
--- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h
+++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h
@@ -25,17 +25,17 @@ public:
   virtual gfx::SurfaceFormat GetFormat() const override;
 
   virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
 
   virtual void Unlock() override {}
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual void Deallocate(ISurfaceAllocator* aAllocator) override { mSurface = nullptr; }
 
   virtual void Forget(ISurfaceAllocator* aAllocator) override { mSurface = nullptr; }
 
   // For debugging purposes only.
   already_AddRefed<gfx::DataSourceSurface> GetAsSurface();
 
--- a/gfx/layers/opengl/TextureClientOGL.h
+++ b/gfx/layers/opengl/TextureClientOGL.h
@@ -23,17 +23,17 @@ namespace layers {
 class EGLImageTextureData : public TextureData
 {
 public:
 
   static already_AddRefed<TextureClient>
   CreateTextureClient(EGLImageImage* aImage, gfx::IntSize aSize,
                       ISurfaceAllocator* aAllocator, TextureFlags aFlags);
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
 
   virtual void Deallocate(ISurfaceAllocator*) override { mImage = nullptr; }
 
   virtual void Forget(ISurfaceAllocator*) override { mImage = nullptr; }
@@ -64,17 +64,17 @@ public:
   CreateTextureClient(gl::AndroidSurfaceTexture* aSurfTex,
                       gfx::IntSize aSize,
                       gl::OriginPos aOriginPos,
                       ISurfaceAllocator* aAllocator,
                       TextureFlags aFlags);
 
   ~AndroidSurfaceTextureData();
 
-  virtual bool HasInternalBuffer() const override { return false; }
+  virtual bool HasIntermediateBuffer() const override { return false; }
 
   virtual gfx::IntSize GetSize() const override { return mSize; }
 
   virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
 
   // Useless functions.
   virtual bool Lock(OpenMode, FenceHandle*) override { return true; }