OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef ImageSource_h | 26 #ifndef ImageSource_h |
27 #define ImageSource_h | 27 #define ImageSource_h |
28 | 28 |
29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
30 #include "platform/graphics/ImageOrientation.h" | 30 #include "platform/graphics/ImageOrientation.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include "wtf/Noncopyable.h" | 32 #include "wtf/Noncopyable.h" |
33 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
34 #include "wtf/Vector.h" | |
35 | 34 |
36 namespace WebCore { | 35 namespace WebCore { |
37 | 36 |
| 37 class ColorSpaceProfile; |
38 class DeferredImageDecoder; | 38 class DeferredImageDecoder; |
39 class ImageOrientation; | 39 class ImageOrientation; |
40 class IntPoint; | 40 class IntPoint; |
41 class IntSize; | 41 class IntSize; |
42 class NativeImageSkia; | 42 class NativeImageSkia; |
43 class SharedBuffer; | 43 class SharedBuffer; |
44 | 44 |
45 // GIF and WebP support animation. The explanation below is in terms of GIF, | 45 // GIF and WebP support animation. The explanation below is in terms of GIF, |
46 // but the same constants are used for WebP, too. | 46 // but the same constants are used for WebP, too. |
47 // GIFs have an optional 16-bit unsigned loop count that describes how an | 47 // GIFs have an optional 16-bit unsigned loop count that describes how an |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // from the beginning. | 90 // from the beginning. |
91 // | 91 // |
92 // Implementations may elect to preserve more frames than the one requested | 92 // Implementations may elect to preserve more frames than the one requested |
93 // here if doing so is likely to save CPU time in the future, but will pay | 93 // here if doing so is likely to save CPU time in the future, but will pay |
94 // an increased memory cost to do so. | 94 // an increased memory cost to do so. |
95 // | 95 // |
96 // Returns the number of bytes of frame data actually cleared. | 96 // Returns the number of bytes of frame data actually cleared. |
97 size_t clearCacheExceptFrame(size_t); | 97 size_t clearCacheExceptFrame(size_t); |
98 | 98 |
99 bool initialized() const; | 99 bool initialized() const; |
| 100 void resetDecoder(); |
100 | 101 |
101 void setData(SharedBuffer& data, bool allDataReceived); | 102 void setData(SharedBuffer& data, bool allDataReceived); |
102 String filenameExtension() const; | 103 String filenameExtension() const; |
103 | 104 |
104 bool isSizeAvailable(); | 105 bool isSizeAvailable(); |
105 bool hasColorProfile() const; | 106 bool hasColorProfile() const; |
| 107 PassRefPtr<ColorSpaceProfile> colorProfile() const; |
| 108 |
106 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con
st; | 109 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con
st; |
107 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI
mageOrientation) const; | 110 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI
mageOrientation) const; |
108 | 111 |
109 bool getHotSpot(IntPoint&) const; | 112 bool getHotSpot(IntPoint&) const; |
110 | 113 |
111 // Returns one of the cAnimationXXX constants at the top of the file, or | 114 // Returns one of the cAnimationXXX constants at the top of the file, or |
112 // a loop count. In the latter case, the actual number of times the animatio
n | 115 // a loop count. In the latter case, the actual number of times the animatio
n |
113 // cycles is one more than the loop count. See comment atop the file. | 116 // cycles is one more than the loop count. See comment atop the file. |
114 int repetitionCount(); | 117 int repetitionCount(); |
115 | 118 |
(...skipping 13 matching lines...) Expand all Loading... |
129 private: | 132 private: |
130 OwnPtr<DeferredImageDecoder> m_decoder; | 133 OwnPtr<DeferredImageDecoder> m_decoder; |
131 | 134 |
132 AlphaOption m_alphaOption; | 135 AlphaOption m_alphaOption; |
133 GammaAndColorProfileOption m_gammaAndColorProfileOption; | 136 GammaAndColorProfileOption m_gammaAndColorProfileOption; |
134 }; | 137 }; |
135 | 138 |
136 } | 139 } |
137 | 140 |
138 #endif | 141 #endif |
OLD | NEW |