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

Unified Diff: src/android/SkBitmapRegionCodec.cpp

Issue 1992143003: Delete workaround for matching bitmap and pixel ref rowbytes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months 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: src/android/SkBitmapRegionCodec.cpp
diff --git a/src/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp
index 065351d2bacd10fa382243c4b61c04b6df4f1193..b9c82d941afc56aa5efbf2263b4db8f101ea06f1 100644
--- a/src/android/SkBitmapRegionCodec.cpp
+++ b/src/android/SkBitmapRegionCodec.cpp
@@ -115,15 +115,8 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat
options.fZeroInitialized = zeroInit;
void* dst = bitmap->getAddr(scaledOutX, scaledOutY);
- // FIXME: skbug.com/4538
- // It is important that we use the rowBytes on the pixelRef. They may not be
- // set properly on the bitmap.
- SkPixelRef* pr = SkRef(bitmap->pixelRef());
- size_t rowBytes = pr->rowBytes();
- bitmap->setInfo(outInfo, rowBytes);
- bitmap->setPixelRef(pr)->unref();
- bitmap->lockPixels();
- SkCodec::Result result = fCodec->getAndroidPixels(decodeInfo, dst, rowBytes, &options);
+ SkCodec::Result result = fCodec->getAndroidPixels(decodeInfo, dst, bitmap->rowBytes(),
+ &options);
if (SkCodec::kSuccess != result && SkCodec::kIncompleteInput != result) {
SkCodecPrintf("Error: Could not get pixels.\n");
return false;
« 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