| Index: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
|
| diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
|
| index 9cf5ad6919a5f368c9cc6ca9ddd12aadf78967ea..a5083a7d16694e659251325b2d098334fadf8659 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
|
| @@ -174,11 +174,19 @@ public:
|
| inputProfile = qcms_profile_sRGB();
|
| if (!inputProfile)
|
| return;
|
| +
|
| // We currently only support color profiles for RGB and RGBA images.
|
| ASSERT(rgbData == qcms_profile_get_color_space(inputProfile));
|
| - qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8;
|
| +
|
| + if (qcms_profile_match(inputProfile, deviceProfile)) {
|
| + qcms_profile_release(inputProfile);
|
| + return;
|
| + }
|
| +
|
| // FIXME: Don't force perceptual intent if the image profile contains an intent.
|
| + qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8;
|
| m_transform = qcms_transform_create(inputProfile, dataFormat, deviceProfile, dataFormat, QCMS_INTENT_PERCEPTUAL);
|
| +
|
| qcms_profile_release(inputProfile);
|
| }
|
| #endif
|
|
|