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

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

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
index 97af0485ac8bf50f46ba0782bb227b80ccee45f1..9fa0926a14270330f2714886dafb6664cf9025ff 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
@@ -529,13 +529,15 @@ SkColorSpaceXform* ImageDecoder::colorTransform() {
return nullptr;
}
- if (SkColorSpace::Equals(m_embeddedColorSpace.get(),
- m_colorBehavior.targetColorSpace().get())) {
+ sk_sp<SkColorSpace> dstColorSpace =
+ m_colorBehavior.targetColorSpace().ToSkColorSpace();
+
+ if (SkColorSpace::Equals(srcColorSpace.get(), dstColorSpace.get())) {
return nullptr;
}
- m_sourceToTargetColorTransform = SkColorSpaceXform::New(
- m_embeddedColorSpace.get(), m_colorBehavior.targetColorSpace().get());
+ m_sourceToTargetColorTransform =
+ SkColorSpaceXform::New(srcColorSpace.get(), dstColorSpace.get());
return m_sourceToTargetColorTransform.get();
}
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698