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

Unified Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 1088093003: Return cropBitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « AUTHORS ('k') | src/images/SkImageDecoder_libwebp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libjpeg.cpp
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 14df6e38b223c919ed739dcaf497a65591eba4b6..d5303ec434e674318f37c8b852cf863f9745ff41 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -1125,11 +1125,11 @@ bool SkJPEGImageDecoder::onDecodeSubset(SkBitmap* bm, const SkIRect& region) {
if (swapOnly) {
bm->swap(bitmap);
- } else {
- cropBitmap(bm, &bitmap, actualSampleSize, region.x(), region.y(),
- region.width(), region.height(), startX, startY);
+ return true;
}
- return true;
+
+ return cropBitmap(bm, &bitmap, actualSampleSize, region.x(), region.y(),
+ region.width(), region.height(), startX, startY);
}
#endif
@@ -1184,11 +1184,10 @@ bool SkJPEGImageDecoder::onDecodeSubset(SkBitmap* bm, const SkIRect& region) {
}
if (swapOnly) {
bm->swap(bitmap);
- } else {
- cropBitmap(bm, &bitmap, actualSampleSize, region.x(), region.y(),
- region.width(), region.height(), startX, startY);
+ return true;
}
- return true;
+ return cropBitmap(bm, &bitmap, actualSampleSize, region.x(), region.y(),
+ region.width(), region.height(), startX, startY);
}
#endif
« no previous file with comments | « AUTHORS ('k') | src/images/SkImageDecoder_libwebp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698