diff options
author | 2015-05-06 13:02:37 -0700 | |
---|---|---|
committer | 2015-05-06 13:02:37 -0700 | |
commit | c1e1faae076a26e0706146e490a60d2894835cd5 (patch) | |
tree | f6b7e350388190c4edfc92c404fcb13540f11d54 /src/core | |
parent | a85d4d0814818e4ddabb9237da209d61d6cd5854 (diff) |
use floor for mip-level choice
this chrome change must land first: https://codereview.chromium.org/1131663002/
BUG=skia:
Review URL: https://codereview.chromium.org/1131613002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkMipMap.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index 1b410856e4..8f38ede7f3 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) { |