| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 187     size_t frameBytesAtIndex(size_t) const; | 188     size_t frameBytesAtIndex(size_t) const; | 
| 188 | 189 | 
| 189     ImageOrientation orientation() const { return m_orientation; } | 190     ImageOrientation orientation() const { return m_orientation; } | 
| 190 | 191 | 
| 191     static bool deferredImageDecodingEnabled(); | 192     static bool deferredImageDecodingEnabled(); | 
| 192 | 193 | 
| 193     void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
      = flag; } | 194     void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile
      = flag; } | 
| 194     bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
     le; } | 195     bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfi
     le; } | 
| 195 | 196 | 
| 196     virtual bool hasColorProfile() const { return false; } | 197     virtual bool hasColorProfile() const { return false; } | 
|  | 198     virtual PassRefPtr<ColorSpaceProfile> colorProfile() const { return nullptr;
      } | 
|  | 199 | 
|  | 200     virtual void setDeviceProfile(ColorSpaceProfile*) { } | 
|  | 201     virtual PassRefPtr<ColorSpaceProfile> deviceProfile() const { return nullptr
     ; } | 
| 197 | 202 | 
| 198 #if USE(QCMSLIB) | 203 #if USE(QCMSLIB) | 
| 199     enum { iccColorProfileHeaderLength = 128 }; | 204     enum { iccColorProfileHeaderLength = 128 }; | 
| 200 | 205 | 
| 201     static bool rgbColorProfile(const char* profileData, unsigned profileLength) | 206     static bool rgbColorProfile(const char* profileData, unsigned profileLength) | 
| 202     { | 207     { | 
| 203         ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
     h); | 208         ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt
     h); | 
| 204 | 209 | 
| 205         return !memcmp(&profileData[16], "RGB ", 4); | 210         return !memcmp(&profileData[16], "RGB ", 4); | 
| 206     } | 211     } | 
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 355 | 360 | 
| 356     IntSize m_size; | 361     IntSize m_size; | 
| 357     bool m_sizeAvailable; | 362     bool m_sizeAvailable; | 
| 358     bool m_isAllDataReceived; | 363     bool m_isAllDataReceived; | 
| 359     bool m_failed; | 364     bool m_failed; | 
| 360 }; | 365 }; | 
| 361 | 366 | 
| 362 } // namespace blink | 367 } // namespace blink | 
| 363 | 368 | 
| 364 #endif | 369 #endif | 
| OLD | NEW | 
|---|