| 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 81cb1eefd862696948af0bf9fe7532b0c0b4bfce..0653e51e89c9cb057a1b68d861ae514bc1181e99 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
|
| @@ -4,7 +4,9 @@
|
|
|
| #include "platform/graphics/ColorBehavior.h"
|
|
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "platform/graphics/BitmapImageMetrics.h"
|
| +#include "third_party/skia/include/core/SkICC.h"
|
| #include "wtf/SpinLock.h"
|
|
|
| namespace blink {
|
| @@ -32,6 +34,18 @@ void ColorBehavior::setGlobalTargetColorProfile(
|
| if (!profile.isEmpty()) {
|
| gTargetColorSpace =
|
| SkColorSpace::MakeICC(profile.data(), profile.size()).release();
|
| + sk_sp<SkICC> skICC = SkICC::Make(profile.data(), profile.size());
|
| + if (skICC) {
|
| + SkMatrix44 toXYZD50;
|
| + bool toXYZD50Result = skICC->toXYZD50(&toXYZD50);
|
| + UMA_HISTOGRAM_BOOLEAN("Blink.ColorSpace.Destination.Matrix",
|
| + toXYZD50Result);
|
| +
|
| + SkColorSpaceTransferFn fn;
|
| + bool isNumericalTransferFnResult = skICC->isNumericalTransferFn(&fn);
|
| + UMA_HISTOGRAM_BOOLEAN("Blink.ColorSpace.Destination.Numerical",
|
| + isNumericalTransferFnResult);
|
| + }
|
| }
|
|
|
| // If we do not succeed, assume sRGB.
|
|
|