Bug 1544478 - Remove unused method Image::GetBuffer(). r=mattwoodrow a=pascalc
authorMarkus Stange <mstange@themasta.com>
Tue, 16 Apr 2019 17:04:41 +0000
changeset 523252 86f6ec90b34b8df2d33d9a9380a2500fd8dfbef9
parent 523251 fe4d81fb62b8947997174ba4cf32a269eeecb33d
child 523253 b1cb8bd44deeae0e8e0d94f7755b1abb04ef5653
push id11115
push useraiakab@mozilla.com
push dateFri, 19 Apr 2019 16:14:22 +0000
treeherdermozilla-beta@86f6ec90b34b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, pascalc
bugs1544478
milestone67.0
Bug 1544478 - Remove unused method Image::GetBuffer(). r=mattwoodrow a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D27604
gfx/layers/ImageContainer.h
gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
gfx/layers/ipc/SharedPlanarYCbCrImage.h
gfx/layers/ipc/SharedRGBImage.cpp
gfx/layers/ipc/SharedRGBImage.h
--- a/gfx/layers/ImageContainer.h
+++ b/gfx/layers/ImageContainer.h
@@ -212,18 +212,16 @@ class Image {
   }
 
   int32_t GetSerial() const { return mSerial; }
 
   virtual already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() = 0;
 
   virtual bool IsValid() const { return true; }
 
-  virtual uint8_t* GetBuffer() const { return nullptr; }
-
   /**
    * For use with the TextureForwarder only (so that the later can
    * synchronize the TextureClient with the TextureHost).
    */
   virtual TextureClient* GetTextureClient(KnowsCompositor* aForwarder) {
     return nullptr;
   }
 
--- a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
+++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp
@@ -46,22 +46,16 @@ size_t SharedPlanarYCbCrImage::SizeOfExc
   return 0;
 }
 
 TextureClient* SharedPlanarYCbCrImage::GetTextureClient(
     KnowsCompositor* aForwarder) {
   return mTextureClient.get();
 }
 
-uint8_t* SharedPlanarYCbCrImage::GetBuffer() const {
-  // This should never be used
-  MOZ_ASSERT(false);
-  return nullptr;
-}
-
 already_AddRefed<gfx::SourceSurface>
 SharedPlanarYCbCrImage::GetAsSourceSurface() {
   if (!IsValid()) {
     NS_WARNING("Can't get as surface");
     return nullptr;
   }
   return PlanarYCbCrImage::GetAsSourceSurface();
 }
--- a/gfx/layers/ipc/SharedPlanarYCbCrImage.h
+++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.h
@@ -26,17 +26,16 @@ class SharedPlanarYCbCrImage : public Pl
  public:
   explicit SharedPlanarYCbCrImage(ImageClient* aCompositable);
 
  protected:
   virtual ~SharedPlanarYCbCrImage();
 
  public:
   TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
-  uint8_t* GetBuffer() const 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
@@ -97,24 +97,16 @@ bool SharedRGBImage::Allocate(gfx::IntSi
         aFormat, aSize, mCompositable->GetTextureFlags());
     mTextureClient =
         mCompositable->GetTextureClientRecycler()->CreateOrRecycle(helper);
   }
 
   return !!mTextureClient;
 }
 
-uint8_t* SharedRGBImage::GetBuffer() const {
-  MappedTextureData mapped;
-  if (mTextureClient && mTextureClient->BorrowMappedData(mapped)) {
-    return mapped.data;
-  }
-  return 0;
-}
-
 gfx::IntSize SharedRGBImage::GetSize() const { return mSize; }
 
 TextureClient* SharedRGBImage::GetTextureClient(KnowsCompositor* aForwarder) {
   return mTextureClient.get();
 }
 
 static void ReleaseTextureClient(void* aData) {
   RELEASE_MANUALLY(static_cast<TextureClient*>(aData));
--- a/gfx/layers/ipc/SharedRGBImage.h
+++ b/gfx/layers/ipc/SharedRGBImage.h
@@ -36,18 +36,16 @@ class SharedRGBImage : public Image {
   explicit SharedRGBImage(ImageClient* aCompositable);
 
  protected:
   virtual ~SharedRGBImage();
 
  public:
   TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override;
 
-  uint8_t* GetBuffer() const override;
-
   gfx::IntSize GetSize() const override;
 
   already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
 
   bool Allocate(gfx::IntSize aSize, gfx::SurfaceFormat aFormat);
 
  private:
   gfx::IntSize mSize;