aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapController.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-06-12 07:09:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-12 07:09:59 -0700
commit3c834324d9a53659999ea496124a3e41001c5f1b (patch)
treecc6a6a8fce3812cb36d2d49a8204049ae07e4a24 /src/core/SkBitmapController.cpp
parent74d614a0448f916963468afa756d922f651c9d30 (diff)
change Resize to take pixmap for src
Diffstat (limited to 'src/core/SkBitmapController.cpp')
-rw-r--r--src/core/SkBitmapController.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp
index dd7eb6f36f..c8164a35c7 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
}