Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/core/SkBitmapController.cpp

Issue 1510673002: Cap filtering to kMedium_SkFilterQuality when downsampling (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: OR Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapController.cpp
diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp
index 233e81146f0e308260b6584567ffb0148c3a9d9b..7182ea73829af66461d61c98dc75addb228777f0 100644
--- a/src/core/SkBitmapController.cpp
+++ b/src/core/SkBitmapController.cpp
@@ -100,6 +100,12 @@ bool SkDefaultBitmapControllerState::processHQRequest(const SkBitmapProvider& pr
if (SkScalarNearlyEqual(invScaleX, 1) && SkScalarNearlyEqual(invScaleY, 1)) {
return false; // no need for HQ
}
+
+#ifndef SK_SUPPORT_LEGACY_HQ_DOWNSAMPLING
+ if (invScaleX > 1 || invScaleY > 1) {
+ return false; // only use HQ when upsampling
+ }
+#endif
const int dstW = SkScalarRoundToScalar(provider.width() / invScaleX);
const int dstH = SkScalarRoundToScalar(provider.height() / invScaleY);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698