Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: tools/android/SkBitmapRegionCodec.cpp

Issue 1442553003: Lock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698