Bug 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
author<tharvik@gmail.com>
Thu, 08 Dec 2016 18:20:12 -0600
changeset 325398 5cebfb1902a202b578c35d65575096348cdedf2b
parent 325397 8faf0055fb54eb3b5394b5a92e7fbc121a0897b5
child 325399 d8f60ae71774924b84fb6347057c7fd45394ed03
push id84693
push usertnikkel@gmail.com
push dateFri, 09 Dec 2016 00:20:23 +0000
treeherdermozilla-inbound@d8f60ae71774 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1321877
milestone53.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 1321877. Fix compiler warnings in Downscaler.h when skia is not enabled. r=tnikkel
image/Downscaler.h
--- a/image/Downscaler.h
+++ b/image/Downscaler.h
@@ -149,39 +149,42 @@ private:
 /**
  * Downscaler requires Skia to work, so we provide a dummy implementation if
  * Skia is disabled that asserts if constructed.
  */
 
 class Downscaler
 {
 public:
-  explicit Downscaler(const nsIntSize&)
+  explicit Downscaler(const nsIntSize&) : mScale(1.0, 1.0)
   {
     MOZ_RELEASE_ASSERT(false, "Skia is not enabled");
   }
 
-  const nsIntSize& OriginalSize() const { return nsIntSize(); }
-  const nsIntSize& TargetSize() const { return nsIntSize(); }
-  const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
+  const nsIntSize& OriginalSize() const { return mSize; }
+  const nsIntSize& TargetSize() const { return mSize; }
+  const gfxSize& Scale() const { return mScale; }
 
   nsresult BeginFrame(const nsIntSize&, const Maybe<nsIntRect>&, uint8_t*, bool, bool = false)
   {
     return NS_ERROR_FAILURE;
   }
 
   bool IsFrameComplete() const { return false; }
   uint8_t* RowBuffer() { return nullptr; }
   void ClearRow() { }
   void ClearRestOfRow(uint32_t) { }
   void CommitRow() { }
   bool HasInvalidation() const { return false; }
   DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
   void ResetForNextProgressivePass() { }
   const nsIntSize FrameSize() const { return nsIntSize(0, 0); }
+private:
+  nsIntSize mSize;
+  gfxSize mScale;
 };
 
 #endif // MOZ_ENABLE_SKIA
 
 
 
 } // namespace image
 } // namespace mozilla