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

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

Issue 2643163004: 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 | « cc/tiles/tile_manager.cc ('k') | 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..0bec4fe61c25a196f05bfb52a52837bdc69c1ed7 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -33,9 +33,10 @@ void ColorBehavior::setGlobalTargetColorProfile(
// Attempt to convert the ICC profile to an SkColorSpace.
if (!(profile == gfx::ICCProfile())) {
+ sk_sp<SkColorSpace> skColorSpace = profile.GetColorSpace().ToSkColorSpace();
+ gTargetColorSpace = skColorSpace.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 | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698