Allowing Lanczos3 to be used in chromium
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
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
index 67a9508..dc50464 100644
--- a/src/core/SkBitmapScaler.cpp
+++ b/src/core/SkBitmapScaler.cpp
@@ -228,7 +228,11 @@
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
}
}
diff --git a/src/effects/SkBitmapSource.cpp b/src/effects/SkBitmapSource.cpp
index ec4fcd1..dd44be7 100644
--- a/src/effects/SkBitmapSource.cpp
+++ b/src/effects/SkBitmapSource.cpp
@@ -71,7 +71,7 @@
// 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);