Index: src/core/SkBitmapController.cpp |
diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp |
index dd7eb6f36f05627a85318a1d8ecbf0a77bb762ac..c8164a35c79109e398fe45b81726c181b02b246b 100644 |
--- a/src/core/SkBitmapController.cpp |
+++ b/src/core/SkBitmapController.cpp |
@@ -122,11 +122,12 @@ bool SkDefaultBitmapControllerState::processHQRequest(const SkBitmap& origBitmap |
SkScalar roundedDestHeight = SkScalarRoundToScalar(trueDestHeight); |
if (!SkBitmapCache::Find(origBitmap, roundedDestWidth, roundedDestHeight, &fResultBitmap)) { |
- if (!SkBitmapScaler::Resize(&fResultBitmap, |
- origBitmap, |
- SkBitmapScaler::RESIZE_BEST, |
- roundedDestWidth, |
- roundedDestHeight, |
+ SkAutoPixmapUnlock src; |
+ if (!origBitmap.requestLock(&src)) { |
+ return false; |
+ } |
+ if (!SkBitmapScaler::Resize(&fResultBitmap, src.pixmap(), SkBitmapScaler::RESIZE_BEST, |
+ roundedDestWidth, roundedDestHeight, |
SkResourceCache::GetAllocator())) { |
return false; // we failed to create fScaledBitmap |
} |