choose better mip level

BUG=skia:

Review URL: https://codereview.chromium.org/845793005
This commit is contained in:
reed 2015-01-15 08:01:40 -08:00 committed by Commit bot
parent fc5ad3cd97
commit 09544fcf96
2 changed files with 7 additions and 1 deletions

View File

@ -40,3 +40,9 @@ blurrects
# New shadow only option in SkDropShadowImageFilter
dropshadowimagefilter
# reed - rebase after mipmap level improvement
downsamplebitmap_image_medium_mandrill_512
downsamplebitmap_image_medium_mandrill_132x132_12x12
downsamplebitmap_checkerboard_medium_512_256
downsamplebitmap_text_medium_72.00pt
filterindiabox

View File

@ -251,7 +251,7 @@ bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const {
return false;
}
int level = compute_level(scale) >> 16;
int level = SkFixedRoundToInt(compute_level(scale));
SkASSERT(level >= 0);
if (level <= 0) {
return false;