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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp

Issue 2177933002: Use UMA to track characteristics of dst color spaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 5 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/image-decoders/ImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
index b3bd7d93278ee227f858d7c18dbbf28eacff334c..931fbac932ed92becbe124e487dc69537a95fb79 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
@@ -21,6 +21,7 @@
#include "platform/image-decoders/ImageDecoder.h"
#include "platform/PlatformInstrumentation.h"
+#include "platform/graphics/BitmapImageMetrics.h"
#include "platform/image-decoders/bmp/BMPImageDecoder.h"
#include "platform/image-decoders/gif/GIFImageDecoder.h"
#include "platform/image-decoders/ico/ICOImageDecoder.h"
@@ -315,6 +316,11 @@ void ImageDecoder::setTargetColorProfile(const WebVector<char>& profile)
if (gTargetColorProfile)
return;
+ {
+ sk_sp<SkColorSpace> colorSpace = SkColorSpace::NewICC(profile.data(), profile.size());
f(malita) 2016/07/25 16:13:54 I presume we use Skia because this info is not ava
msarett 2016/07/25 16:50:51 Yes that's correct!
+ BitmapImageMetrics::countGamma(colorSpace.get());
+ }
+
// FIXME: Add optional ICCv4 support and support for multiple monitors.
gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size());
if (!gTargetColorProfile)

Powered by Google App Engine
This is Rietveld 408576698