Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| index 2e0e007cc221b427abeb514d1eeb28400a623a86..a56b153a260028d0e60383479c2935a12178fe2f 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| @@ -342,7 +342,9 @@ TEST_F(DeferredImageDecoderTest, frameOpacity) { |
| Vector<char> storage(size); |
| SkPixmap pixmap(pix_info, storage.data(), row_bytes); |
| - // Before decoding, the frame is not known to be opaque. |
| + // Before decoding, the frame's alpha is unknown and assumed to be |
| + // transparent. This works well with partial decoding, which will be |
| + // transparent until the full first frame is decoded. |
| sk_sp<SkImage> frame = decoder->CreateFrameAtIndex(0); |
| ASSERT_TRUE(frame); |
| EXPECT_FALSE(frame->isOpaque()); |
| @@ -353,7 +355,9 @@ TEST_F(DeferredImageDecoderTest, frameOpacity) { |
| // After decoding, the frame is known to be opaque. |
|
scroggo_chromium
2017/05/08 14:56:36
This line looks to be no longer true.
cblume
2017/05/25 06:52:36
Done.
|
| frame = decoder->CreateFrameAtIndex(0); |
| ASSERT_TRUE(frame); |
| - EXPECT_TRUE(frame->isOpaque()); |
| + // The GIF file specifies it is opaque. |
| + // Without the file, we remain at the default: transparent |
|
scroggo_chromium
2017/05/08 14:56:36
When test_gif is false, it means that data_ is a P
cblume
2017/05/25 06:52:36
Done.
|
| + EXPECT_EQ(test_gif, frame->isOpaque()); |
| // Re-generating the opaque-marked frame should not fail. |
| EXPECT_TRUE(frame->readPixels(pixmap, 0, 0)); |