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; |