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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp

Issue 2523943002: Explicitly specify target color space to ImageDecoder at creation (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/image-decoders/gif/GIFImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
index 0b6c259c61961a007f904b0d52a208e347b48734..925799c3bb30d2e32bb91289a893022af2aa67eb 100644
--- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
@@ -46,9 +46,10 @@ namespace {
const char layoutTestResourcesDir[] = "LayoutTests/images/resources";
std::unique_ptr<ImageDecoder> createDecoder() {
- return wrapUnique(new GIFImageDecoder(ImageDecoder::AlphaNotPremultiplied,
- ImageDecoder::ColorSpaceApplied,
- ImageDecoder::noDecodedImageByteLimit));
+ return wrapUnique(new GIFImageDecoder(
+ ImageDecoder::AlphaNotPremultiplied, ImageDecoder::ColorSpaceTransformed,
+ ImageDecoder::targetColorSpaceForTesting(),
+ ImageDecoder::noDecodedImageByteLimit));
}
void testRepetitionCount(const char* dir,
@@ -447,11 +448,13 @@ TEST(GIFImageDecoderTest, bitmapAlphaType) {
SharedBuffer::create(fullData->data(), kTruncateSize);
std::unique_ptr<ImageDecoder> premulDecoder = wrapUnique(new GIFImageDecoder(
- ImageDecoder::AlphaPremultiplied, ImageDecoder::ColorSpaceApplied,
+ ImageDecoder::AlphaPremultiplied, ImageDecoder::ColorSpaceTransformed,
+ ImageDecoder::targetColorSpaceForTesting(),
ImageDecoder::noDecodedImageByteLimit));
std::unique_ptr<ImageDecoder> unpremulDecoder =
wrapUnique(new GIFImageDecoder(ImageDecoder::AlphaNotPremultiplied,
- ImageDecoder::ColorSpaceApplied,
+ ImageDecoder::ColorSpaceTransformed,
+ ImageDecoder::targetColorSpaceForTesting(),
ImageDecoder::noDecodedImageByteLimit));
// Partially decoded frame => the frame alpha type is unknown and should

Powered by Google App Engine
This is Rietveld 408576698