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

Unified Diff: src/core/SkBitmapController.cpp

Issue 1681953004: Use min scale when selecting mip level (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months 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 7a317b8c2f324f58b9abb0d15b1043986ba108a7..d56bc4a85768132bceb592f31b11d445ca1c9144 100644
--- a/src/core/SkBitmapController.cpp
+++ b/src/core/SkBitmapController.cpp
@@ -170,9 +170,9 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmapProvider
return false;
}
- // Use the largest (non-inverse) scale, to ensure anisotropic consistency.
+ // Use the smallest (non-inverse) scale to match the GPU impl.
SkASSERT(invScaleSize.width() >= 0 && invScaleSize.height() >= 0);
- const SkScalar invScale = SkTMin(invScaleSize.width(), invScaleSize.height());
+ const SkScalar invScale = SkTMax(invScaleSize.width(), invScaleSize.height());
if (invScale > SK_Scalar1) {
fCurrMip.reset(SkMipMapCache::FindAndRef(provider.makeCacheDesc()));
« 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