Index: tests/CodecTest.cpp |
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp |
index fcbfadd0680bc25225fd1f0bb1f94d85dc779a60..09264181bee1f81741d0ce3cedb6139501650f1b 100644 |
--- a/tests/CodecTest.cpp |
+++ b/tests/CodecTest.cpp |
@@ -1119,4 +1119,16 @@ DEF_TEST(Codec_PngRoundTrip, r) { |
result = codec->getPixels(codec->getInfo(), bm2.getPixels(), bm2.rowBytes()); |
REPORTER_ASSERT(r, SkCodec::kSuccess == result); |
check_round_trip(r, bm2); |
+ |
+ // Create an arbitrary alpha8 bitmap. |
+ path = "arrow.png"; |
+ stream.reset(resource(path)); |
+ codec.reset(SkCodec::NewFromStream(stream.release())); |
+ SkBitmap tmp; |
+ tmp.allocPixels(codec->getInfo()); |
+ result = codec->getPixels(codec->getInfo(), tmp.getPixels(), tmp.rowBytes()); |
+ REPORTER_ASSERT(r, SkCodec::kSuccess == result); |
+ SkBitmap bm3; |
+ tmp.copyTo(&bm3, kAlpha_8_SkColorType); |
+ check_round_trip(r, bm3); |
} |