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 13 matching lines...) Expand all Loading... |
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/PlatformScreen.h" | 32 #include "platform/PlatformScreen.h" |
33 #include "platform/SharedBuffer.h" | 33 #include "platform/SharedBuffer.h" |
| 34 #include "platform/graphics/ColorSpaceProfile.h" |
34 #include "platform/graphics/ImageSource.h" | 35 #include "platform/graphics/ImageSource.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/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 40 #include "wtf/Vector.h" |
39 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
40 #include "wtf/Vector.h" | |
41 | 42 |
42 #if USE(QCMSLIB) | 43 #if USE(QCMSLIB) |
43 #include "qcms.h" | 44 #include "qcms.h" |
44 #if OS(MACOSX) | 45 #if OS(MACOSX) |
45 #include <ApplicationServices/ApplicationServices.h> | 46 #include <ApplicationServices/ApplicationServices.h> |
46 #include "wtf/RetainPtr.h" | 47 #include "wtf/RetainPtr.h" |
47 #endif | 48 #endif |
48 #endif | 49 #endif |
49 | 50 |
50 namespace WebCore { | 51 namespace WebCore { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 virtual unsigned frameBytesAtIndex(size_t) const; | 149 virtual unsigned frameBytesAtIndex(size_t) const; |
149 | 150 |
150 ImageOrientation orientation() const { return m_orientation; } | 151 ImageOrientation orientation() const { return m_orientation; } |
151 | 152 |
152 static bool deferredImageDecodingEnabled(); | 153 static bool deferredImageDecodingEnabled(); |
153 | 154 |
154 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
= flag; } | 155 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
= flag; } |
155 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
le; } | 156 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
le; } |
156 | 157 |
157 virtual bool hasColorProfile() const { return false; } | 158 virtual bool hasColorProfile() const { return false; } |
| 159 virtual PassRefPtr<ColorSpaceProfile> colorProfile() const { return nullptr;
} |
158 | 160 |
159 #if USE(QCMSLIB) | 161 #if USE(QCMSLIB) |
160 enum { iccColorProfileHeaderLength = 128 }; | 162 enum { iccColorProfileHeaderLength = 128 }; |
161 | 163 |
162 static bool rgbColorProfile(const char* profileData, unsigned profileLength) | 164 static bool rgbColorProfile(const char* profileData, unsigned profileLength) |
163 { | 165 { |
164 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
h); | 166 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
h); |
165 | 167 |
166 return !memcmp(&profileData[16], "RGB ", 4); | 168 return !memcmp(&profileData[16], "RGB ", 4); |
167 } | 169 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 300 |
299 IntSize m_size; | 301 IntSize m_size; |
300 bool m_sizeAvailable; | 302 bool m_sizeAvailable; |
301 bool m_isAllDataReceived; | 303 bool m_isAllDataReceived; |
302 bool m_failed; | 304 bool m_failed; |
303 }; | 305 }; |
304 | 306 |
305 } // namespace WebCore | 307 } // namespace WebCore |
306 | 308 |
307 #endif | 309 #endif |
OLD | NEW |