OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
4 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 4 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 protected: | 96 protected: |
97 enum RepetitionCountStatus { | 97 enum RepetitionCountStatus { |
98 Unknown, // We haven't checked the source's repetition count. | 98 Unknown, // We haven't checked the source's repetition count. |
99 Uncertain, // We have a repetition count, but it might be wrong (some GIF
s have a count after the image data, and will report "loop once" until all data
has been decoded). | 99 Uncertain, // We have a repetition count, but it might be wrong (some GIF
s have a count after the image data, and will report "loop once" until all data
has been decoded). |
100 Certain // The repetition count is known to be correct. | 100 Certain // The repetition count is known to be correct. |
101 }; | 101 }; |
102 | 102 |
103 BitmapImage(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); | 103 BitmapImage(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); |
104 BitmapImage(ImageObserver* = 0); | 104 BitmapImage(ImageObserver* = 0); |
105 | 105 |
106 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, CompositeOperator, blink::WebBlendMode) OVERRIDE; | 106 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, CompositeOperator, WebBlendMode) OVERRIDE; |
107 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, CompositeOperator, blink::WebBlendMode, RespectImageOrientationEnum)
OVERRIDE; | 107 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, CompositeOperator, WebBlendMode, RespectImageOrientationEnum) OVERRI
DE; |
108 | 108 |
109 size_t currentFrame() const { return m_currentFrame; } | 109 size_t currentFrame() const { return m_currentFrame; } |
110 size_t frameCount(); | 110 size_t frameCount(); |
111 PassRefPtr<NativeImageSkia> frameAtIndex(size_t); | 111 PassRefPtr<NativeImageSkia> frameAtIndex(size_t); |
112 bool frameIsCompleteAtIndex(size_t); | 112 bool frameIsCompleteAtIndex(size_t); |
113 float frameDurationAtIndex(size_t); | 113 float frameDurationAtIndex(size_t); |
114 bool frameHasAlphaAtIndex(size_t); | 114 bool frameHasAlphaAtIndex(size_t); |
115 ImageOrientation frameOrientationAtIndex(size_t); | 115 ImageOrientation frameOrientationAtIndex(size_t); |
116 | 116 |
117 // Decodes and caches a frame. Never accessed except internally. | 117 // Decodes and caches a frame. Never accessed except internally. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 bool m_allDataReceived : 1; // Whether or not we've received all our data. | 185 bool m_allDataReceived : 1; // Whether or not we've received all our data. |
186 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. | 186 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. |
187 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 187 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
188 mutable bool m_hasUniformFrameSize : 1; | 188 mutable bool m_hasUniformFrameSize : 1; |
189 mutable bool m_haveFrameCount : 1; | 189 mutable bool m_haveFrameCount : 1; |
190 }; | 190 }; |
191 | 191 |
192 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 192 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
193 | 193 |
194 } | 194 } // namespace blink |
195 | 195 |
196 #endif | 196 #endif |
OLD | NEW |