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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual bool getHBITMAP(HBITMAP); | 152 virtual bool getHBITMAP(HBITMAP); |
153 virtual bool getHBITMAPOfSize(HBITMAP, LPSIZE); | 153 virtual bool getHBITMAPOfSize(HBITMAP, LPSIZE); |
154 #endif | 154 #endif |
155 | 155 |
156 #if PLATFORM(GTK) | 156 #if PLATFORM(GTK) |
157 virtual GdkPixbuf* getGdkPixbuf(); | 157 virtual GdkPixbuf* getGdkPixbuf(); |
158 #endif | 158 #endif |
159 | 159 |
160 virtual NativeImagePtr nativeImageForCurrentFrame() { return frameAtIndex(cu
rrentFrame()); } | 160 virtual NativeImagePtr nativeImageForCurrentFrame() { return frameAtIndex(cu
rrentFrame()); } |
161 bool frameHasAlphaAtIndex(size_t); | 161 bool frameHasAlphaAtIndex(size_t); |
162 bool currentFrameHasAlpha() { return frameHasAlphaAtIndex(currentFrame()); } | 162 virtual bool currentFrameHasAlpha() { return frameHasAlphaAtIndex(currentFra
me()); } |
163 | 163 |
164 #if !ASSERT_DISABLED | 164 #if !ASSERT_DISABLED |
165 bool notSolidColor() | 165 virtual bool notSolidColor() |
166 { | 166 { |
167 return size().width() != 1 || size().height() != 1 || frameCount() > 1; | 167 return size().width() != 1 || size().height() != 1 || frameCount() > 1; |
168 } | 168 } |
169 #endif | 169 #endif |
170 | 170 |
171 protected: | 171 protected: |
172 enum RepetitionCountStatus { | 172 enum RepetitionCountStatus { |
173 Unknown, // We haven't checked the source's repetition count. | 173 Unknown, // We haven't checked the source's repetition count. |
174 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). | 174 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). |
175 Certain // The repetition count is known to be correct. | 175 Certain // The repetition count is known to be correct. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 unsigned m_decodedSize; // The current size of all decoded frames. | 295 unsigned m_decodedSize; // The current size of all decoded frames. |
296 mutable unsigned m_decodedPropertiesSize; // The size of data decoded by the
source to determine image properties (e.g. size, frame count, etc). | 296 mutable unsigned m_decodedPropertiesSize; // The size of data decoded by the
source to determine image properties (e.g. size, frame count, etc). |
297 | 297 |
298 mutable bool m_haveFrameCount; | 298 mutable bool m_haveFrameCount; |
299 size_t m_frameCount; | 299 size_t m_frameCount; |
300 }; | 300 }; |
301 | 301 |
302 } | 302 } |
303 | 303 |
304 #endif | 304 #endif |
OLD | NEW |