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

Unified Diff: src/core/SkMipMap.cpp

Issue 1137493003: [M43] use floor for mip-level choice (Closed) Base URL: https://chromium.googlesource.com/skia.git@m43
Patch Set: Created 5 years, 7 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/SkMipMap.cpp
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp
index 1b410856e4ed07d7a134897f4bb43fdae6327d52..4a548b8562c2b8ed0f87939466306939d30e6129 100644
--- a/src/core/SkMipMap.cpp
+++ b/src/core/SkMipMap.cpp
@@ -334,8 +334,9 @@ bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const {
return false;
}
SkASSERT(L >= 0);
- int level = SkScalarRoundToInt(L);
-// SkDebugf("mipmap scale=%g L=%g level=%d\n", scale, L, level);
+// int rndLevel = SkScalarRoundToInt(L);
+ int level = SkScalarFloorToInt(L);
+// SkDebugf("mipmap scale=%g L=%g level=%d rndLevel=%d\n", scale, L, level, rndLevel);
SkASSERT(level >= 0);
if (level <= 0) {
« 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