| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 virtual ImageAnimationPolicy animationPolicy() { | 133 virtual ImageAnimationPolicy animationPolicy() { |
| 134 return ImageAnimationPolicyAllowed; | 134 return ImageAnimationPolicyAllowed; |
| 135 } | 135 } |
| 136 virtual void advanceTime(double deltaTimeInSeconds) {} | 136 virtual void advanceTime(double deltaTimeInSeconds) {} |
| 137 | 137 |
| 138 // Advances an animated image. For BitmapImage (e.g., animated gifs) this | 138 // Advances an animated image. For BitmapImage (e.g., animated gifs) this |
| 139 // will advance to the next frame. For SVGImage, this will trigger an | 139 // will advance to the next frame. For SVGImage, this will trigger an |
| 140 // animation update for CSS and advance the SMIL timeline by one frame. | 140 // animation update for CSS and advance the SMIL timeline by one frame. |
| 141 virtual void advanceAnimationForTesting() {} | 141 virtual void advanceAnimationForTesting() {} |
| 142 | 142 |
| 143 // Typically the ImageResource that owns us. | 143 // Typically the ImageResourceContent that owns us. |
| 144 ImageObserver* getImageObserver() const { | 144 ImageObserver* getImageObserver() const { |
| 145 return m_imageObserverDisabled ? nullptr : m_imageObserver; | 145 return m_imageObserverDisabled ? nullptr : m_imageObserver; |
| 146 } | 146 } |
| 147 void clearImageObserver() { m_imageObserver = nullptr; } | 147 void clearImageObserver() { m_imageObserver = nullptr; } |
| 148 // To avoid interleaved accesses to |m_imageObserverDisabled|, do not call | 148 // To avoid interleaved accesses to |m_imageObserverDisabled|, do not call |
| 149 // setImageObserverDisabled() other than from ImageObserverDisabler. | 149 // setImageObserverDisabled() other than from ImageObserverDisabler. |
| 150 void setImageObserverDisabled(bool disabled) { | 150 void setImageObserverDisabled(bool disabled) { |
| 151 m_imageObserverDisabled = disabled; | 151 m_imageObserverDisabled = disabled; |
| 152 } | 152 } |
| 153 | 153 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 const FloatSize& tileScaleFactor, | 211 const FloatSize& tileScaleFactor, |
| 212 TileRule hRule, | 212 TileRule hRule, |
| 213 TileRule vRule, | 213 TileRule vRule, |
| 214 SkBlendMode); | 214 SkBlendMode); |
| 215 | 215 |
| 216 private: | 216 private: |
| 217 RefPtr<SharedBuffer> m_encodedImageData; | 217 RefPtr<SharedBuffer> m_encodedImageData; |
| 218 // TODO(Oilpan): consider having Image on the Oilpan heap and | 218 // TODO(Oilpan): consider having Image on the Oilpan heap and |
| 219 // turn this into a Member<>. | 219 // turn this into a Member<>. |
| 220 // | 220 // |
| 221 // The observer (an ImageResource) is an untraced member, with the | 221 // The observer (an ImageResourceContent) is an untraced member, with the |
| 222 // ImageResource being responsible for clearing itself out. | 222 // ImageResourceContent being responsible for clearing itself out. |
| 223 UntracedMember<ImageObserver> m_imageObserver; | 223 UntracedMember<ImageObserver> m_imageObserver; |
| 224 bool m_imageObserverDisabled; | 224 bool m_imageObserverDisabled; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 227 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 228 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \ | 228 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \ |
| 229 image.is##typeName()) | 229 image.is##typeName()) |
| 230 | 230 |
| 231 } // namespace blink | 231 } // namespace blink |
| 232 | 232 |
| 233 #endif | 233 #endif |
| OLD | NEW |