Backout 629c399c6f8c for breaking the tree
authorJoe Drew <joe@drew.ca>
Wed, 03 Oct 2012 13:37:45 -0400
changeset 109199 90332928696a88c81b494b1ec30f87abe6bcbdc6
parent 109198 df644c7b24a6711c5a355fa66d27c0f3488cbcb7
child 109200 78cef490d36dcc9d2ababe508485fac3c6b1da35
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
milestone18.0a1
backs out629c399c6f8cf9e3cb33587a74ee5c137a051159
Backout 629c399c6f8c for breaking the tree
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -2788,37 +2788,25 @@ RasterImage::ScaleRequest::Stop(RasterIm
     request->done = false;
     request->dstFrame = nullptr;
     request->scale.width = 0;
     request->scale.height = 0;
   }
   request->stopped = true;
 }
 
-static inline bool
-IsDownscale(const gfxSize& scale)
-{
-  if (scale.width > 1.0)
-    return false;
-  if (scale.height > 1.0)
-    return false;
-  if (scale.width == 1.0 && scale.height == 1.0)
-    return false;
-
-  return true;
-}
-
 bool
 RasterImage::CanScale(gfxPattern::GraphicsFilter aFilter,
                       gfxSize aScale)
 {
 // The high-quality scaler requires Skia.
 #ifdef MOZ_ENABLE_SKIA
   if (gHQDownscaling && aFilter == gfxPattern::FILTER_GOOD &&
-      !mAnim && mDecoded && IsDownscale(aScale)) {
+      !mAnim && mDecoded &&
+      (aScale.width <= 1.0 && aScale.height <= 1.0)) {
     gfxFloat factor = gHQDownscalingMinFactor / 1000.0;
     return (aScale.width < factor || aScale.height < factor);
   }
 #endif
 
   return false;
 }