Bug 1060609 (Part 1) - Disable downscale-during-decode when HQ scaling is disabled. r=tn
authorSeth Fowler <mark.seth.fowler@gmail.com>
Tue, 01 Sep 2015 14:13:15 -0700
changeset 260424 e177bf9013974fd0f3d07b2360f2b96e04a5e68b
parent 260423 56da88fd78802993b11e30abd1f60084fdc70912
child 260425 d6ee72faf4fb071dbd8e0e93fd04a9a59f31a3b5
push id29311
push usercbook@mozilla.com
push dateWed, 02 Sep 2015 11:53:18 +0000
treeherdermozilla-central@1b687fcb5213 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1060609
milestone43.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 1060609 (Part 1) - Disable downscale-during-decode when HQ scaling is disabled. r=tn
image/RasterImage.cpp
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -1596,16 +1596,17 @@ RasterImage::CanScale(GraphicsFilter aFi
 
 bool
 RasterImage::CanDownscaleDuringDecode(const IntSize& aSize, uint32_t aFlags)
 {
   // Check basic requirements: downscale-during-decode is enabled for this
   // image, we have all the source data and know our size, the flags allow us to
   // do it, and a 'good' filter is being used.
   if (!mDownscaleDuringDecode || !mHasSize ||
+      !gfxPrefs::ImageHQDownscalingEnabled() ||
       !(aFlags & imgIContainer::FLAG_HIGH_QUALITY_SCALING)) {
     return false;
   }
 
   // We don't downscale animated images during decode.
   if (mAnim) {
     return false;
   }