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

Unified Diff: src/images/SkDecodingImageGenerator.cpp

Issue 647023006: Qualify the return value of SkImageDecoder::decode (Closed) Base URL: https://skia.googlesource.com/skia.git/+/master
Patch Set: fix a sample Created 6 years, 2 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 | « samplecode/SampleUnpremul.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkDecodingImageGenerator.cpp
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
index a90c1cf01f8af0b2c169c70dd67045305324037a..cdee7c16764902c31d123d047ce42afa96474cfa 100644
--- a/src/images/SkDecodingImageGenerator.cpp
+++ b/src/images/SkDecodingImageGenerator.cpp
@@ -171,7 +171,7 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info,
TargetAllocator allocator(fInfo, pixels, rowBytes);
decoder->setAllocator(&allocator);
bool success = decoder->decode(fStream, &bitmap, info.colorType(),
- SkImageDecoder::kDecodePixels_Mode);
+ SkImageDecoder::kDecodePixels_Mode) != SkImageDecoder::kFailure;
decoder->setAllocator(NULL);
if (!success) {
return false;
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698