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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp

Issue 2556723003: Merge color options into ColorBehavior (Closed)
Patch Set: Feedback Created 4 years 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/ico/ICOImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
index 80501882474cb9d9cd8881e9a4279b15b05d10d7..7a6a188380827effee79e46add9f148a7e5f04f3 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp
@@ -43,17 +43,13 @@ static const size_t sizeOfDirectory = 6;
static const size_t sizeOfDirEntry = 16;
ICOImageDecoder::ICOImageDecoder(AlphaOption alphaOption,
- ColorSpaceOption colorOptions,
- sk_sp<SkColorSpace> targetColorSpace,
+ const ColorBehavior& colorBehavior,
size_t maxDecodedBytes)
- : ImageDecoder(alphaOption,
- colorOptions,
- std::move(targetColorSpace),
- maxDecodedBytes),
+ : ImageDecoder(alphaOption, colorBehavior, maxDecodedBytes),
m_fastReader(nullptr),
m_decodedOffset(0),
m_dirEntriesCount(0),
- m_colorSpaceOption(colorOptions) {}
+ m_colorBehavior(colorBehavior) {}
ICOImageDecoder::~ICOImageDecoder() {}
@@ -216,8 +212,8 @@ bool ICOImageDecoder::decodeAtIndex(size_t index) {
AlphaOption alphaOption =
m_premultiplyAlpha ? AlphaPremultiplied : AlphaNotPremultiplied;
m_pngDecoders[index] = wrapUnique(
- new PNGImageDecoder(alphaOption, m_colorSpaceOption, m_targetColorSpace,
- m_maxDecodedBytes, dirEntry.m_imageOffset));
+ new PNGImageDecoder(alphaOption, m_colorBehavior, m_maxDecodedBytes,
+ dirEntry.m_imageOffset));
setDataForPNGDecoderAtIndex(index);
}
// Fail if the size the PNGImageDecoder calculated does not match the size

Powered by Google App Engine
This is Rietveld 408576698