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

Unified Diff: tests/ImageTest.cpp

Issue 2044573002: Revert of Make SkPngCodec decode progressively. (Closed) Base URL: https://skia.googlesource.com/skia.git@foil
Patch Set: Rebase Created 4 years, 6 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 | « tests/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageTest.cpp
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index b2bf49533842785a8f5b618c0d51b349825d2c33..0922364d0fda07742188528c36c1c4ee9a028a3a 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -161,10 +161,6 @@ static void test_encode(skiatest::Reporter* reporter, SkImage* image) {
REPORTER_ASSERT(reporter, origEncoded->size() > 0);
sk_sp<SkImage> decoded(SkImage::MakeFromEncoded(origEncoded));
- if (!decoded) {
- ERRORF(reporter, "failed to decode image!");
- return;
- }
REPORTER_ASSERT(reporter, decoded);
assert_equal(reporter, image, nullptr, decoded.get());
@@ -522,10 +518,6 @@ static bool has_pixels(const SkPMColor pixels[], int count, SkPMColor expected)
}
static void test_read_pixels(skiatest::Reporter* reporter, SkImage* image) {
- if (!image) {
- ERRORF(reporter, "Failed to create image!");
- return;
- }
const SkPMColor expected = SkPreMultiplyColor(SK_ColorWHITE);
const SkPMColor notExpected = ~expected;
@@ -611,10 +603,6 @@ static void check_legacy_bitmap(skiatest::Reporter* reporter, const SkImage* ima
}
static void test_legacy_bitmap(skiatest::Reporter* reporter, const SkImage* image, SkImage::LegacyBitmapMode mode) {
- if (!image) {
- ERRORF(reporter, "Failed to create image.");
- return;
- }
SkBitmap bitmap;
REPORTER_ASSERT(reporter, image->asLegacyBitmap(&bitmap, mode));
check_legacy_bitmap(reporter, image, bitmap, mode);
@@ -666,10 +654,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageLegacyBitmap_Gpu, reporter, ctxInfo) {
#endif
static void test_peek(skiatest::Reporter* reporter, SkImage* image, bool expectPeekSuccess) {
- if (!image) {
- ERRORF(reporter, "Failed to create image!");
- return;
- }
SkPixmap pm;
bool success = image->peekPixels(&pm);
REPORTER_ASSERT(reporter, expectPeekSuccess == success);
@@ -873,10 +857,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredTextureImage, reporter, ctxInfo) {
for (auto testCase : testCases) {
sk_sp<SkImage> image(testCase.fImageFactory());
- if (!image) {
- ERRORF(reporter, "Failed to create image!");
- continue;
- }
// This isn't currently used in the implementation, just set any old values.
SkImage::DeferredTextureImageUsageParams params;
« no previous file with comments | « tests/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698