| Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| index eea37216069119c5290f1214cdcbc4869be27544..aae986c09f11421e96370477debebfbe36e0c74d 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| @@ -49,6 +49,22 @@ typedef Vector<char> ColorProfile;
|
|
|
| namespace blink {
|
|
|
| +#if USE(QCMSLIB)
|
| +enum ColorProfileStatus {
|
| + ColorProfileNone = 0,
|
| + ColorProfileNotFound = 1, // A profile was expected but could not be retrieved
|
| + ColorProfileIsCorrupted = 2,
|
| + ColorProfileIsNotRGB = 3,
|
| + ColorProfileIsNotAnInputProfile = 4,
|
| + ColorProfileIsV4 = 5,
|
| + ColorProfileFailedDecode = 6,
|
| + ColorProfileIsBogus = 7,
|
| + ColorProfileSuccess = 8,
|
| + ColorProfileSuccess_PNGsRGB = 9, // Using built-in sRGB tag (no actual embedded profile)
|
| + ValueCount = 10
|
| +};
|
| +#endif
|
| +
|
| // ImagePlanes can be used to decode color components into provided buffers instead of using an ImageFrame.
|
| class PLATFORM_EXPORT ImagePlanes {
|
| public:
|
| @@ -212,25 +228,16 @@ public:
|
| return !memcmp(&profileData[12], "mntr", 4) || !memcmp(&profileData[12], "scnr", 4);
|
| }
|
|
|
| + static bool isICCv4(const char* profileData, unsigned profileLength)
|
| + {
|
| + ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLength);
|
| +
|
| + return profileData[8] == 4;
|
| + }
|
| +
|
| class OutputDeviceProfile {
|
| public:
|
| - OutputDeviceProfile()
|
| - : m_outputDeviceProfile(0)
|
| - {
|
| - ColorProfile profile = screenColorProfile();
|
| - if (!profile.isEmpty())
|
| - m_outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size());
|
| -
|
| - if (m_outputDeviceProfile && qcms_profile_is_bogus(m_outputDeviceProfile)) {
|
| - qcms_profile_release(m_outputDeviceProfile);
|
| - m_outputDeviceProfile = 0;
|
| - }
|
| -
|
| - if (!m_outputDeviceProfile)
|
| - m_outputDeviceProfile = qcms_profile_sRGB();
|
| - if (m_outputDeviceProfile)
|
| - qcms_profile_precache_output_transform(m_outputDeviceProfile);
|
| - }
|
| + OutputDeviceProfile();
|
|
|
| qcms_profile* profile() const { return m_outputDeviceProfile; }
|
|
|
|
|