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

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

Issue 2644233004: Use ICCProfile to construct SkColorSpace (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
index 65a560a1b30309197b0221919b7667ed94038463..8ca79b85f78cb2be9fe4a4ae75befbcacc8c7f3f 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -33,9 +33,11 @@ void ColorBehavior::setGlobalTargetColorProfile(
// Attempt to convert the ICC profile to an SkColorSpace.
if (!(profile == gfx::ICCProfile())) {
+ sk_sp<SkColorSpace> profileColorSpace =
+ profile.GetColorSpace().ToSkColorSpace();
+ gTargetColorSpace = profileColorSpace.release();
+
const std::vector<char>& data = profile.GetData();
- gTargetColorSpace =
- SkColorSpace::MakeICC(data.data(), data.size()).release();
sk_sp<SkICC> skICC = SkICC::Make(data.data(), data.size());
if (skICC) {
SkMatrix44 toXYZD50;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698