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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp

Issue 2787053004: Respect colorSpace in DecodingImageGenerator::onGetPixels() (Closed)
Patch Set: Response to comments Created 3 years, 8 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
Index: third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp
index c72740578780138748b5e4a7f3ff8f3616f71faf..702594465236b8f84795a4e3cfc5789138b39e5c 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp
@@ -59,8 +59,8 @@ class ImageFrameGeneratorTest : public ::testing::Test,
public:
void SetUp() override {
ImageDecodingStore::instance().setCacheLimitInBytes(1024 * 1024);
- m_generator =
- ImageFrameGenerator::create(fullSize(), false, ColorBehavior::ignore());
+ m_generator = ImageFrameGenerator::create(imageInfo(), false,
+ ColorBehavior::ignore());
m_data = SharedBuffer::create();
m_segmentReader = SegmentReader::createFromSharedBuffer(m_data);
useMockImageDecoderFactory();
@@ -111,7 +111,7 @@ class ImageFrameGeneratorTest : public ::testing::Test,
m_frameCount = count;
if (count > 1) {
m_generator.clear();
- m_generator = ImageFrameGenerator::create(fullSize(), true,
+ m_generator = ImageFrameGenerator::create(imageInfo(), true,
ColorBehavior::ignore());
useMockImageDecoderFactory();
}
@@ -216,7 +216,8 @@ TEST_F(ImageFrameGeneratorTest, frameHasAlpha) {
ImageDecoder* tempDecoder = 0;
EXPECT_TRUE(ImageDecodingStore::instance().lockDecoder(
- m_generator.get(), fullSize(), &tempDecoder));
+ m_generator.get(), fullSize(), ImageDecoder::AlphaPremultiplied,
+ &tempDecoder));
ASSERT_TRUE(tempDecoder);
tempDecoder->frameBufferAtIndex(0)->setHasAlpha(false);
ImageDecodingStore::instance().unlockDecoder(m_generator.get(), tempDecoder);

Powered by Google App Engine
This is Rietveld 408576698