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

Unified Diff: bench/SkipZeroesBench.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 | « no previous file | include/core/SkImageDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkipZeroesBench.cpp
diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp
index fc25f8b074fef6b68811beaabfe6f926565e9c4e..5d18264ea13df86080f721ceb2219abe5e2d511a 100644
--- a/bench/SkipZeroesBench.cpp
+++ b/bench/SkipZeroesBench.cpp
@@ -83,15 +83,15 @@ protected:
// Decode a bunch of times
SkBitmap bm;
for (int i = 0; i < loops; ++i) {
- SkDEBUGCODE(bool success =) fDecoder->decode(&fStream, &bm,
- SkImageDecoder::kDecodePixels_Mode);
+ SkDEBUGCODE(SkImageDecoder::Result result =) fDecoder->decode(&fStream, &bm,
+ SkImageDecoder::kDecodePixels_Mode);
#ifdef SK_DEBUG
- if (!success) {
+ if (SkImageDecoder::kFailure == result) {
SkDebugf("failed to decode %s\n", fFilename.c_str());
return;
}
#endif
- SkDEBUGCODE(success =) fStream.rewind();
+ SkDEBUGCODE(bool success =) fStream.rewind();
#ifdef SK_DEBUG
if (!success) {
SkDebugf("failed to rewind %s\n", fFilename.c_str());
« no previous file with comments | « no previous file | include/core/SkImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698