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

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

Issue 2609093002: Revert of Use consistent types for ICC profiles (Closed)
Patch Set: Created 3 years, 12 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
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 2e61629145bddeb2feadc0ddfe0283c5a132fe8c..67635875686d8640ce9b87e9d641c11c609650ef 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -18,9 +18,9 @@
} // namespace
// static
-void ColorBehavior::setGlobalTargetColorSpace(
- const sk_sp<SkColorSpace>& colorSpace) {
- if (!colorSpace)
+void ColorBehavior::setGlobalTargetColorProfile(
+ const WebVector<char>& profile) {
+ if (profile.isEmpty())
return;
// Take a lock around initializing and accessing the global device color
@@ -31,9 +31,8 @@
if (gTargetColorSpace)
return;
- // Ensure that the color space object be leaked.
- gTargetColorSpace = colorSpace.get();
- SkSafeRef(gTargetColorSpace);
+ gTargetColorSpace =
+ SkColorSpace::MakeICC(profile.data(), profile.size()).release();
// UMA statistics.
BitmapImageMetrics::countOutputGammaAndGamut(gTargetColorSpace);

Powered by Google App Engine
This is Rietveld 408576698