| Index: cc/tiles/software_image_decode_cache.cc
|
| diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
|
| index cc1f54fbda0c091f355f0c3a75c338d715879b3e..c41e24024e3d87acb48c2c6046e747fe6e196e79 100644
|
| --- a/cc/tiles/software_image_decode_cache.cc
|
| +++ b/cc/tiles/software_image_decode_cache.cc
|
| @@ -921,14 +921,16 @@ ImageDecodeCacheKey ImageDecodeCacheKey::FromDrawImage(const DrawImage& image) {
|
| // If we're not going to do a scale, we can use low filter quality. Note that
|
| // checking if the sizes are the same is better than checking if scale is 1.f,
|
| // because even non-1 scale can result in the same (rounded) width/height.
|
| - // If either dimension is a downscale, then use mipmaps (medium filter
|
| - // quality).
|
| + // If either dimension is a downscale, and the quality is not None (in which
|
| + // case we need to preserve the pixelated scale), then use mipmaps (medium
|
| + // filter quality).
|
| if (target_size.width() == src_rect.width() &&
|
| target_size.height() == src_rect.height()) {
|
| quality = std::min(quality, kLow_SkFilterQuality);
|
| - } else if (target_size.width() < src_rect.width() ||
|
| - target_size.height() < src_rect.height()) {
|
| - quality = std::min(quality, kMedium_SkFilterQuality);
|
| + } else if (quality != kNone_SkFilterQuality &&
|
| + (target_size.width() < src_rect.width() ||
|
| + target_size.height() < src_rect.height())) {
|
| + quality = kMedium_SkFilterQuality;
|
| }
|
|
|
| // Drop from high to medium if the the matrix we applied wasn't decomposable,
|
|
|