Index: src/core/SkMipMap.cpp |
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp |
index 1b410856e4ed07d7a134897f4bb43fdae6327d52..8f38ede7f3d72a8a770f6421433613888b90763c 100644 |
--- a/src/core/SkMipMap.cpp |
+++ b/src/core/SkMipMap.cpp |
@@ -334,8 +334,13 @@ bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const { |
return false; |
} |
SkASSERT(L >= 0); |
+#ifdef SK_SUPPORT_LEGACY_ROUND_MIPMAP_LEVEL_CHOICE |
int level = SkScalarRoundToInt(L); |
-// SkDebugf("mipmap scale=%g L=%g level=%d\n", scale, L, level); |
+#else |
+// int rndLevel = SkScalarRoundToInt(L); |
+ int level = SkScalarFloorToInt(L); |
+#endif |
+// SkDebugf("mipmap scale=%g L=%g level=%d rndLevel=%d\n", scale, L, level, rndLevel); |
SkASSERT(level >= 0); |
if (level <= 0) { |