| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // automatically pause once all observers no longer want to render the image
anywhere. | 76 // automatically pause once all observers no longer want to render the image
anywhere. |
| 77 virtual void stopAnimation() OVERRIDE; | 77 virtual void stopAnimation() OVERRIDE; |
| 78 virtual void resetAnimation() OVERRIDE; | 78 virtual void resetAnimation() OVERRIDE; |
| 79 virtual bool maybeAnimated() OVERRIDE; | 79 virtual bool maybeAnimated() OVERRIDE; |
| 80 | 80 |
| 81 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE; | 81 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE; |
| 82 virtual PassRefPtr<Image> imageForDefaultFrame() OVERRIDE; | 82 virtual PassRefPtr<Image> imageForDefaultFrame() OVERRIDE; |
| 83 virtual bool currentFrameKnownToBeOpaque() OVERRIDE; | 83 virtual bool currentFrameKnownToBeOpaque() OVERRIDE; |
| 84 | 84 |
| 85 ImageOrientation currentFrameOrientation(); | 85 ImageOrientation currentFrameOrientation(); |
| 86 void resetDecoder(); |
| 86 | 87 |
| 87 #if ENABLE(ASSERT) | 88 #if ENABLE(ASSERT) |
| 88 virtual bool notSolidColor() OVERRIDE; | 89 virtual bool notSolidColor() OVERRIDE; |
| 89 #endif | 90 #endif |
| 90 | 91 |
| 91 private: | 92 private: |
| 92 friend class BitmapImageTest; | 93 friend class BitmapImageTest; |
| 93 | 94 |
| 94 void resetDecoder(); | |
| 95 void updateSize() const; | 95 void updateSize() const; |
| 96 | 96 |
| 97 protected: | 97 protected: |
| 98 enum RepetitionCountStatus { | 98 enum RepetitionCountStatus { |
| 99 Unknown, // We haven't checked the source's repetition count. | 99 Unknown, // We haven't checked the source's repetition count. |
| 100 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 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). |
| 101 Certain // The repetition count is known to be correct. | 101 Certain // The repetition count is known to be correct. |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 BitmapImage(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); | 104 BitmapImage(PassRefPtr<NativeImageSkia>, ImageObserver* = 0); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 190 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
| 191 mutable bool m_hasUniformFrameSize : 1; | 191 mutable bool m_hasUniformFrameSize : 1; |
| 192 mutable bool m_haveFrameCount : 1; | 192 mutable bool m_haveFrameCount : 1; |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 195 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 196 | 196 |
| 197 } // namespace blink | 197 } // namespace blink |
| 198 | 198 |
| 199 #endif | 199 #endif |
| OLD | NEW |