Index: tools/android/SkBitmapRegionCodec.cpp |
diff --git a/tools/android/SkBitmapRegionCodec.cpp b/tools/android/SkBitmapRegionCodec.cpp |
index 7c3c2471b0cbf7db75e778b399709ac4d169a521..415b60c5ab354e9ddeac605585e02b4e68244c30 100644 |
--- a/tools/android/SkBitmapRegionCodec.cpp |
+++ b/tools/android/SkBitmapRegionCodec.cpp |
@@ -129,6 +129,7 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat |
size_t rowBytes = pr->rowBytes(); |
bitmap->setInfo(outInfo, rowBytes); |
bitmap->setPixelRef(pr)->unref(); |
+ bitmap->lockPixels(); |
SkCodec::Result result = fCodec->getAndroidPixels(decodeInfo, dst, rowBytes, &options); |
if (SkCodec::kSuccess != result && SkCodec::kIncompleteInput != result) { |
SkCodecPrintf("Error: Could not get pixels.\n"); |