Allowing Lanczos3 to be used in chromium
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 14 Feb 2014 18:46:08 +0000 (18:46 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 14 Feb 2014 18:46:08 +0000 (18:46 +0000)
BUG=skia:
R=senorblanco@google.com, reed@google.com, humper@google.com, senorblanco@chromium.org, robertphillips@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/163663002

git-svn-id: http://skia.googlecode.com/svn/trunk@13459 2bbb7eff-a529-9590-31e7-b0007b416f81

expectations/gm/ignored-tests.txt
src/core/SkBitmapScaler.cpp
src/effects/SkBitmapSource.cpp

index 5bfc6a42f3d0e0d3610517be00808962ce07df12..a165a84086e2ed9adf9a8b43199045acbeaf46a2 100644 (file)
@@ -37,3 +37,8 @@
 # deprecated calling pattern.
 # https://codereview.chromium.org/154163002/
 extractbitmap
+
+# Need to rebaseline since SkBitmapSource was modified to use higher filter quality
+# https://codereview.chromium.org/163663002/
+bitmapsource
+imagefiltersscaled
index 67a9508ee98250e4a401f471a3e5a877f49415ec..dc50464e54c837220811a2c55dc91bd321ab16a3 100644 (file)
@@ -228,7 +228,11 @@ static SkBitmapScaler::ResizeMethod ResizeMethodToAlgorithmMethod(
         case SkBitmapScaler::RESIZE_BETTER:
             return SkBitmapScaler::RESIZE_HAMMING;
         default:
+#ifdef SK_HIGH_QUALITY_IS_LANCZOS
+            return SkBitmapScaler::RESIZE_LANCZOS3;
+#else
             return SkBitmapScaler::RESIZE_MITCHELL;
+#endif
     }
 }
 
index ec4fcd16fbf57de6b4c9bc2d63c2fa65f182408d..dd44be7cd68105fb4e0d6ae83a085c50f997c48c 100644 (file)
@@ -71,7 +71,7 @@ bool SkBitmapSource::onFilterImage(Proxy* proxy, const SkBitmap&, const SkMatrix
     // None filtering when it's translate-only
     paint.setFilterLevel(
         fSrcRect.width() == dstRect.width() && fSrcRect.height() == dstRect.height() ?
-        SkPaint::kNone_FilterLevel : SkPaint::kMedium_FilterLevel);
+        SkPaint::kNone_FilterLevel : SkPaint::kHigh_FilterLevel);
     canvas.drawBitmapRectToRect(fBitmap, &fSrcRect, dstRect, &paint);
 
     *result = device.get()->accessBitmap(false);