OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 12 matching lines...) Expand all Loading... |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef ImageDecoder_h | 27 #ifndef ImageDecoder_h |
28 #define ImageDecoder_h | 28 #define ImageDecoder_h |
29 | 29 |
30 #include "SkColorPriv.h" | 30 #include "SkColorPriv.h" |
31 #include "platform/PlatformExport.h" | 31 #include "platform/PlatformExport.h" |
32 #include "platform/SharedBuffer.h" | 32 #include "platform/SharedBuffer.h" |
| 33 #include "platform/graphics/ColorSpaceProfile.h" |
33 #include "platform/graphics/ImageOrientation.h" | 34 #include "platform/graphics/ImageOrientation.h" |
34 #include "platform/image-decoders/ImageAnimation.h" | 35 #include "platform/image-decoders/ImageAnimation.h" |
35 #include "platform/image-decoders/ImageFrame.h" | 36 #include "platform/image-decoders/ImageFrame.h" |
36 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
37 #include "wtf/Assertions.h" | 38 #include "wtf/Assertions.h" |
38 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
39 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
40 #include "wtf/Threading.h" | 41 #include "wtf/Threading.h" |
41 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
42 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 size_t frameBytesAtIndex(size_t) const; | 190 size_t frameBytesAtIndex(size_t) const; |
190 | 191 |
191 ImageOrientation orientation() const { return m_orientation; } | 192 ImageOrientation orientation() const { return m_orientation; } |
192 | 193 |
193 static bool deferredImageDecodingEnabled(); | 194 static bool deferredImageDecodingEnabled(); |
194 | 195 |
195 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
= flag; } | 196 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
= flag; } |
196 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
le; } | 197 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
le; } |
197 | 198 |
198 virtual bool hasColorProfile() const { return false; } | 199 virtual bool hasColorProfile() const { return false; } |
| 200 virtual PassRefPtr<ColorSpaceProfile> colorProfile() const { return nullptr;
} |
199 | 201 |
200 #if USE(QCMSLIB) | 202 #if USE(QCMSLIB) |
201 enum { iccColorProfileHeaderLength = 128 }; | 203 enum { iccColorProfileHeaderLength = 128 }; |
202 | 204 |
203 static bool rgbColorProfile(const char* profileData, unsigned profileLength) | 205 static bool rgbColorProfile(const char* profileData, unsigned profileLength) |
204 { | 206 { |
205 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
h); | 207 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
h); |
206 | 208 |
207 return !memcmp(&profileData[16], "RGB ", 4); | 209 return !memcmp(&profileData[16], "RGB ", 4); |
208 } | 210 } |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 361 |
360 IntSize m_size; | 362 IntSize m_size; |
361 bool m_sizeAvailable; | 363 bool m_sizeAvailable; |
362 bool m_isAllDataReceived; | 364 bool m_isAllDataReceived; |
363 bool m_failed; | 365 bool m_failed; |
364 }; | 366 }; |
365 | 367 |
366 } // namespace blink | 368 } // namespace blink |
367 | 369 |
368 #endif | 370 #endif |
OLD | NEW |