Bug 1544478 - Remove unused method Image::GetBuffer(). r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Tue, 16 Apr 2019 17:04:41 +0000
changeset 469716 185e608c385272703bd89da77aa0d9a4d2c7a024
parent 469715 4ab1a110e5d50f11983bbe9b4500c44383767328
child 469717 8c63b67c8273c834e56dc9b100b74caada9a0631
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1544478
milestone68.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 1544478 - Remove unused method Image::GetBuffer(). r=mattwoodrow 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;