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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 virtual void setAnimationPolicy(ImageAnimationPolicy) { } | 122 virtual void setAnimationPolicy(ImageAnimationPolicy) { } |
123 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy
Allowed; } | 123 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy
Allowed; } |
124 virtual void advanceTime(double deltaTimeInSeconds) { } | 124 virtual void advanceTime(double deltaTimeInSeconds) { } |
125 | 125 |
126 // Advances an animated image. For BitmapImage (e.g., animated gifs) this | 126 // Advances an animated image. For BitmapImage (e.g., animated gifs) this |
127 // will advance to the next frame. For SVGImage, this will trigger an | 127 // will advance to the next frame. For SVGImage, this will trigger an |
128 // animation update for CSS and advance the SMIL timeline by one frame. | 128 // animation update for CSS and advance the SMIL timeline by one frame. |
129 virtual void advanceAnimationForTesting() { } | 129 virtual void advanceAnimationForTesting() { } |
130 | 130 |
131 // Typically the ImageResource that owns us. | 131 // Typically the ImageResource that owns us. |
132 ImageObserver* imageObserver() const { return m_imageObserver; } | 132 ImageObserver* getImageObserver() const { return m_imageObserver; } |
133 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} | 133 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} |
134 | 134 |
135 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; | 135 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; |
136 | 136 |
137 virtual PassRefPtr<SkImage> imageForCurrentFrame() = 0; | 137 virtual PassRefPtr<SkImage> imageForCurrentFrame() = 0; |
138 virtual PassRefPtr<Image> imageForDefaultFrame(); | 138 virtual PassRefPtr<Image> imageForDefaultFrame(); |
139 | 139 |
140 virtual void drawPattern(GraphicsContext&, const FloatRect&, | 140 virtual void drawPattern(GraphicsContext&, const FloatRect&, |
141 const FloatSize&, const FloatPoint& phase, SkXfermode::Mode, | 141 const FloatSize&, const FloatPoint& phase, SkXfermode::Mode, |
142 const FloatRect&, const FloatSize& repeatSpacing = FloatSize()); | 142 const FloatRect&, const FloatSize& repeatSpacing = FloatSize()); |
(...skipping 21 matching lines...) Expand all Loading... |
164 // being responsible of clearing itself out. | 164 // being responsible of clearing itself out. |
165 RawPtrWillBeUntracedMember<ImageObserver> m_imageObserver; | 165 RawPtrWillBeUntracedMember<ImageObserver> m_imageObserver; |
166 }; | 166 }; |
167 | 167 |
168 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 168 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
169 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 169 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
170 | 170 |
171 } // namespace blink | 171 } // namespace blink |
172 | 172 |
173 #endif | 173 #endif |
OLD | NEW |