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

Unified Diff: samplecode/SampleUnpremul.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 | « include/core/SkImageDecoder.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleUnpremul.cpp
diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp
index 992444d05d060a426ec49f39afa24c2249d215e7..ffe4428b484949bce73e5214394489fd2500c045 100644
--- a/samplecode/SampleUnpremul.cpp
+++ b/samplecode/SampleUnpremul.cpp
@@ -182,7 +182,7 @@ private:
decoder->setRequireUnpremultipliedColors(true);
}
fDecodeSucceeded = decoder->decode(&stream, &fBitmap, kN32_SkColorType,
- SkImageDecoder::kDecodePixels_Mode);
+ SkImageDecoder::kDecodePixels_Mode) != SkImageDecoder::kFailure;
this->inval(NULL);
}
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698