| 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 10969e12369f813e18fee2c1787079da3769ce82..ade02330ba90ef474a55aff70c172053b39ab39a 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
|
| @@ -38,6 +38,17 @@ void ColorBehavior::setGlobalTargetColorProfile(
|
| BitmapImageMetrics::countOutputGamma(gTargetColorSpace);
|
| }
|
|
|
| +void ColorBehavior::setGlobalTargetColorSpaceForTesting(
|
| + const sk_sp<SkColorSpace>& colorSpace) {
|
| + // Take a lock around initializing and accessing the global device color
|
| + // profile.
|
| + SpinLock::Guard guard(gTargetColorSpaceLock);
|
| +
|
| + SkSafeUnref(gTargetColorSpace);
|
| + gTargetColorSpace = colorSpace.get();
|
| + SkSafeRef(gTargetColorSpace);
|
| +}
|
| +
|
| // static
|
| sk_sp<SkColorSpace> ColorBehavior::globalTargetColorSpace() {
|
| // Take a lock around initializing and accessing the global device color
|
|
|