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

Unified Diff: tests/ImageDecodingTest.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 | « src/ports/SkImageDecoder_empty.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 30665a6f8e57a4dd5c9b3cd6f3129542034fed2a..762852d62a5e9189b808532199486d2c5cf250f7 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -93,7 +93,7 @@ static void compare_unpremul(skiatest::Reporter* reporter, const SkString& filen
}
bool success = decoder->decode(&stream, &bm8888, kN32_SkColorType,
- SkImageDecoder::kDecodePixels_Mode);
+ SkImageDecoder::kDecodePixels_Mode) != SkImageDecoder::kFailure;
if (!success) {
return;
}
@@ -106,7 +106,7 @@ static void compare_unpremul(skiatest::Reporter* reporter, const SkString& filen
decoder->setRequireUnpremultipliedColors(true);
success = decoder->decode(&stream, &bm8888Unpremul, kN32_SkColorType,
- SkImageDecoder::kDecodePixels_Mode);
+ SkImageDecoder::kDecodePixels_Mode) != SkImageDecoder::kFailure;
if (!success) {
return;
}
@@ -812,7 +812,7 @@ DEF_TEST(ImageDecoding_JpegOverwrite, r) {
decoder->setSampleSize(2);
SkBitmap bitmap;
bool success = decoder->decode(stream, &bitmap, kRGB_565_SkColorType,
- SkImageDecoder::kDecodePixels_Mode);
+ SkImageDecoder::kDecodePixels_Mode) != SkImageDecoder::kFailure;
REPORTER_ASSERT(r, success);
REPORTER_ASSERT(r, !allocator->ready()); // Decoder used correct memory
REPORTER_ASSERT(r, sentinal == pixels[pixelCount]);
« no previous file with comments | « src/ports/SkImageDecoder_empty.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698