Chromium Code Reviews| Index: src/core/SkBitmapProcState.cpp |
| diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
| index 8874e7b4452308e62bcb12e964f3e9d9660ce92f..d59dc9ffdeeaf8ba73dcf53837149926f3c778ca 100644 |
| --- a/src/core/SkBitmapProcState.cpp |
| +++ b/src/core/SkBitmapProcState.cpp |
| @@ -263,6 +263,7 @@ bool SkBitmapProcState::possiblyScaleImage() { |
| if (mip) { |
| fScaledCacheID = SkScaledImageCache::AddAndLockMip(fOrigBitmap, |
| mip); |
| + SkASSERT(mip->getRefCnt() > 1); |
| mip->unref(); // the cache took a ref |
| SkASSERT(fScaledCacheID); |
| } |
| @@ -403,6 +404,12 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { |
| return false; |
| } |
| + // If we are "still" kMedium_FilterLeve, then then request was not fulfilled by possiblyScale, |
|
scroggo
2014/04/17 15:34:49
nit: kMedium_FilterLevel ('l' missing).
scroggo
2014/04/17 15:34:49
'then then' -> 'then the'
reed1
2014/04/17 15:40:13
Done.
reed1
2014/04/17 15:40:13
Done.
|
| + // so we downgrade to kLow (so the rest of the sniffing code can assume that |
|
scroggo
2014/04/17 15:34:49
nit: missing ')'
reed1
2014/04/17 15:40:13
Done.
|
| + if (SkPaint::kMedium_FilterLevel == fFilterLevel) { |
| + fFilterLevel = SkPaint::kLow_FilterLevel; |
| + } |
| + |
| bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0; |
| bool clampClamp = SkShader::kClamp_TileMode == fTileModeX && |
| SkShader::kClamp_TileMode == fTileModeY; |