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

Unified Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.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/graphics/DeferredImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
index d7dbfaf45e177d3fcda55f3919df724fc973384c..c706acb42f2e0d811cd82ed0d922aa0a343c0dd8 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -61,13 +61,11 @@ std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::create(
PassRefPtr<SharedBuffer> passData,
bool dataComplete,
ImageDecoder::AlphaOption alphaOption,
- ImageDecoder::ColorSpaceOption colorOptions,
- sk_sp<SkColorSpace> targetColorSpace) {
+ const ColorBehavior& colorBehavior) {
RefPtr<SharedBuffer> data = passData;
std::unique_ptr<ImageDecoder> actualDecoder =
- ImageDecoder::create(data, dataComplete, alphaOption, colorOptions,
- std::move(targetColorSpace));
+ ImageDecoder::create(data, dataComplete, alphaOption, colorBehavior);
if (!actualDecoder)
return nullptr;
@@ -277,8 +275,7 @@ void DeferredImageDecoder::activateLazyDecoding() {
SkISize::Make(m_actualDecoder->decodedSize().width(),
m_actualDecoder->decodedSize().height());
m_frameGenerator = ImageFrameGenerator::create(
- decodedSize, !isSingleFrame, m_actualDecoder->colorSpaceOption(),
- m_actualDecoder->targetColorSpace());
+ decodedSize, !isSingleFrame, m_actualDecoder->colorBehavior());
}
void DeferredImageDecoder::prepareLazyDecodedFrames() {

Powered by Google App Engine
This is Rietveld 408576698