| 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 * | 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual void resetAnimation() {} | 114 virtual void resetAnimation() {} |
| 115 | 115 |
| 116 // True if this image can potentially animate. | 116 // True if this image can potentially animate. |
| 117 virtual bool maybeAnimated() { return false; } | 117 virtual bool maybeAnimated() { return false; } |
| 118 | 118 |
| 119 // Set animationPolicy | 119 // Set animationPolicy |
| 120 virtual void setAnimationPolicy(ImageAnimationPolicy) { } | 120 virtual void setAnimationPolicy(ImageAnimationPolicy) { } |
| 121 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy
Allowed; } | 121 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy
Allowed; } |
| 122 virtual void advanceTime(double deltaTimeInSeconds) { } | 122 virtual void advanceTime(double deltaTimeInSeconds) { } |
| 123 | 123 |
| 124 // Advances an animated image. For BitmapImage (e.g., animated gifs) this |
| 125 // will advance to the next frame. For SVGImage, this will trigger an |
| 126 // animation update for CSS and advance the SMIL timeline by one frame. |
| 127 virtual void advanceAnimationForTesting() { } |
| 128 |
| 124 // Typically the ImageResource that owns us. | 129 // Typically the ImageResource that owns us. |
| 125 ImageObserver* imageObserver() const { return m_imageObserver; } | 130 ImageObserver* imageObserver() const { return m_imageObserver; } |
| 126 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} | 131 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} |
| 127 | 132 |
| 128 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; | 133 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; |
| 129 | 134 |
| 130 bool deprecatedBitmapForCurrentFrame(SkBitmap*) WARN_UNUSED_RETURN; | 135 bool deprecatedBitmapForCurrentFrame(SkBitmap*) WARN_UNUSED_RETURN; |
| 131 | 136 |
| 132 virtual PassRefPtr<SkImage> imageForCurrentFrame() = 0; | 137 virtual PassRefPtr<SkImage> imageForCurrentFrame() = 0; |
| 133 virtual PassRefPtr<Image> imageForDefaultFrame(); | 138 virtual PassRefPtr<Image> imageForDefaultFrame(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 154 RefPtr<SharedBuffer> m_encodedImageData; | 159 RefPtr<SharedBuffer> m_encodedImageData; |
| 155 ImageObserver* m_imageObserver; | 160 ImageObserver* m_imageObserver; |
| 156 }; | 161 }; |
| 157 | 162 |
| 158 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 163 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 159 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 164 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 160 | 165 |
| 161 } // namespace blink | 166 } // namespace blink |
| 162 | 167 |
| 163 #endif | 168 #endif |
| OLD | NEW |