| Index: src/core/SkBitmapProcState.cpp
|
| diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
|
| index 8874e7b4452308e62bcb12e964f3e9d9660ce92f..1936f6a23bd384516aeaae8e20145a566912743e 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_FilterLevel, then the request was not fulfilled by possiblyScale,
|
| + // so we downgrade to kLow (so the rest of the sniffing code can assume that)
|
| + 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;
|
|
|