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 9e2eae50bd3a8a31e5b62fff429fc46a0bd420c6..44c3223ac736e39c894b8845e49b2130c6b6ce9b 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
@@ -244,6 +244,40 @@ size_t ImageDecoder::findRequiredPreviousFrame(size_t frameIndex, bool frameRect |
} |
} |
+#if USE(QCMSLIB) |
+ImageDecoder::OutputDeviceProfile::OutputDeviceProfile() : m_outputDeviceProfile(0) |
+{ |
+ ColorProfileStatus status = ColorProfileSuccess; |
+ |
+ ColorProfile profile = screenColorProfile(); |
+ if (!profile.isEmpty()) { |
+ if (ImageDecoder::isICCv4(profile.data(), profile.size())) { |
+ status = ColorProfileIsV4; |
Noel Gordon
2015/12/23 15:28:48
We don't seem to actually read / use the profile i
Justin Novosad
2015/12/23 15:58:10
The prupose is to track the prevalence of ICC v4 p
|
+ } else { |
+ m_outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size()); |
+ if (!m_outputDeviceProfile) { |
+ status = ColorProfileFailedDecode; |
Noel Gordon
2015/12/23 15:28:48
ColorProfileFailedDecode -> ColorProfileInvalidCon
|
+ } else { |
+ if (qcms_profile_is_bogus(m_outputDeviceProfile)) { |
+ status = ColorProfileIsBogus; |
Noel Gordon
2015/12/23 15:28:48
ColorProfileIsBogus -> ColorProfileInvalidProfile
|
+ qcms_profile_release(m_outputDeviceProfile); |
+ m_outputDeviceProfile = 0; |
+ } |
+ } |
+ } |
+ } else { |
+ status = ColorProfileNone; |
Noel Gordon
2015/12/23 15:28:47
ColorProfileNone -> ColorProfileEmpty
the profile
|
+ } |
+ |
+ Platform::current()->histogramEnumeration("ColorManagement.ColorProfileStatus.Display", status, ColorProfileStatus::ValueCount); |
+ |
+ if (!m_outputDeviceProfile) |
+ m_outputDeviceProfile = qcms_profile_sRGB(); |
+ if (m_outputDeviceProfile) |
+ qcms_profile_precache_output_transform(m_outputDeviceProfile); |
+} |
+#endif |
+ |
ImagePlanes::ImagePlanes() |
{ |
for (int i = 0; i < 3; ++i) { |