| 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);
|
|
|