| 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 420a5a73e1add9e81eee9b441cf825282e69cf37..3aea8a277b2bdf1f5f6588e752e82d51d27774ba 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
|
| @@ -210,18 +210,16 @@ class PLATFORM_EXPORT ImageDecoder {
|
|
|
| ImageOrientation orientation() const { return m_orientation; }
|
|
|
| - bool ignoresGammaAndColorProfile() const {
|
| - return m_ignoreGammaAndColorProfile;
|
| - }
|
| + bool ignoresColorSpace() const { return m_ignoreColorSpace; }
|
| static void setTargetColorProfile(const WebVector<char>&);
|
|
|
| - // Note that hasColorProfile refers to the existence of a not-ignored
|
| - // embedded color profile, and is independent of whether or not that
|
| - // profile's transform has been baked into the pixel values.
|
| - bool hasColorProfile() const { return m_hasColorProfile; }
|
| + // Note that hasColorSpace refers to the existence of a not-ignored
|
| + // embedded color space, and is independent of whether or not that
|
| + // space's transform has been baked into the pixel values.
|
| + bool hasColorSpace() const { return m_srcSpace.get(); }
|
| void setColorSpaceAndComputeTransform(const char* iccData,
|
| - unsigned iccLength,
|
| - bool useSRGB);
|
| + unsigned iccLength);
|
| + void setColorSpaceAndComputeTransform(sk_sp<SkColorSpace> srcSpace);
|
|
|
| // Transformation from encoded color space to target color space.
|
| SkColorSpaceXform* colorTransform() {
|
| @@ -268,8 +266,7 @@ class PLATFORM_EXPORT ImageDecoder {
|
| GammaAndColorProfileOption colorOptions,
|
| size_t maxDecodedBytes)
|
| : m_premultiplyAlpha(alphaOption == AlphaPremultiplied),
|
| - m_ignoreGammaAndColorProfile(colorOptions ==
|
| - GammaAndColorProfileIgnored),
|
| + m_ignoreColorSpace(colorOptions == GammaAndColorProfileIgnored),
|
| m_maxDecodedBytes(maxDecodedBytes),
|
| m_purgeAggressively(false) {}
|
|
|
| @@ -308,13 +305,13 @@ class PLATFORM_EXPORT ImageDecoder {
|
| // Decodes the requested frame.
|
| virtual void decode(size_t) = 0;
|
|
|
| - // Returns the embedded image color profile.
|
| - const ImageFrame::ICCProfile& colorProfile() const { return m_colorProfile; }
|
| + // Returns the embedded image color space.
|
| + sk_sp<SkColorSpace> colorSpace() const { return m_srcSpace; }
|
|
|
| RefPtr<SegmentReader> m_data; // The encoded data.
|
| Vector<ImageFrame, 1> m_frameBufferCache;
|
| const bool m_premultiplyAlpha;
|
| - const bool m_ignoreGammaAndColorProfile;
|
| + const bool m_ignoreColorSpace;
|
| ImageOrientation m_orientation;
|
|
|
| // The maximum amount of memory a decoded image should require. Ideally,
|
| @@ -349,9 +346,7 @@ class PLATFORM_EXPORT ImageDecoder {
|
| bool m_isAllDataReceived = false;
|
| bool m_failed = false;
|
|
|
| - bool m_hasColorProfile = false;
|
| - ImageFrame::ICCProfile m_colorProfile;
|
| -
|
| + sk_sp<SkColorSpace> m_srcSpace = nullptr;
|
| std::unique_ptr<SkColorSpaceXform> m_sourceToOutputDeviceColorTransform;
|
| };
|
|
|
|
|