Bug 1275750 (Part 1) - Remove unused ScalingData-related code. r=edwin
authorSeth Fowler <mark.seth.fowler@gmail.com>
Thu, 26 May 2016 11:33:38 -0700
changeset 340268 09070d5abf9f80a20fa9bb8d75c8ba3a253aec13
parent 340267 1cf7e08007f9b63d228f9e42a9b501c22a48da92
child 340269 7c4ec7324278eabb7a00fcd9c11191fd699feb40
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1275750
milestone49.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 1275750 (Part 1) - Remove unused ScalingData-related code. r=edwin
image/imgFrame.cpp
image/imgFrame.h
--- a/image/imgFrame.cpp
+++ b/image/imgFrame.cpp
@@ -969,30 +969,16 @@ imgFrame::GetAnimationData() const
   }
 
   bool hasAlpha = mFormat == SurfaceFormat::B8G8R8A8;
 
   return AnimationData(data, PaletteDataLength(), mTimeout, GetRect(),
                        mBlendMethod, mDisposalMethod, hasAlpha);
 }
 
-ScalingData
-imgFrame::GetScalingData() const
-{
-  MonitorAutoLock lock(mMonitor);
-  MOZ_ASSERT(mLockCount > 0, "Image data should be locked");
-  MOZ_ASSERT(!GetIsPaletted(), "GetScalingData can't handle paletted images");
-
-  uint8_t* data;
-  uint32_t length;
-  GetImageDataInternal(&data, &length);
-
-  return ScalingData(data, mSize, GetImageBytesPerRow(), mFormat);
-}
-
 void
 imgFrame::Abort()
 {
   MonitorAutoLock lock(mMonitor);
 
   mAborted = true;
 
   // Wake up anyone who's waiting.
--- a/image/imgFrame.h
+++ b/image/imgFrame.h
@@ -72,42 +72,16 @@ struct AnimationData
   uint32_t mPaletteDataLength;
   int32_t mRawTimeout;
   nsIntRect mRect;
   BlendMethod mBlendMethod;
   DisposalMethod mDisposalMethod;
   bool mHasAlpha;
 };
 
-/**
- * ScalingData contains all of the information necessary for performing
- * high-quality (CPU-based) scaling an imgFrame.
- *
- * It includes pointers to the raw image data of the underlying imgFrame, but
- * does not own that data. A RawAccessFrameRef for the underlying imgFrame must
- * outlive the ScalingData for it to remain valid.
- */
-struct ScalingData
-{
-  ScalingData(uint8_t* aRawData,
-              gfx::IntSize aSize,
-              uint32_t aBytesPerRow,
-              gfx::SurfaceFormat aFormat)
-    : mRawData(aRawData)
-    , mSize(aSize)
-    , mBytesPerRow(aBytesPerRow)
-    , mFormat(aFormat)
-  { }
-
-  uint8_t* mRawData;
-  gfx::IntSize mSize;
-  uint32_t mBytesPerRow;
-  gfx::SurfaceFormat mFormat;
-};
-
 class imgFrame
 {
   typedef gfx::Color Color;
   typedef gfx::DataSourceSurface DataSourceSurface;
   typedef gfx::DrawTarget DrawTarget;
   typedef gfx::Filter Filter;
   typedef gfx::IntSize IntSize;
   typedef gfx::SourceSurface SourceSurface;
@@ -252,17 +226,16 @@ public:
   /**
    * Get the SurfaceFormat for this imgFrame.
    *
    * This should only be used for assertions.
    */
   SurfaceFormat GetFormat() const;
 
   AnimationData GetAnimationData() const;
-  ScalingData GetScalingData() const;
 
   bool GetCompositingFailed() const;
   void SetCompositingFailed(bool val);
 
   void SetOptimizable();
 
   Color SinglePixelColor() const;
   bool IsSinglePixel() const;