| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // the image is rendered, and automatically pauses once all observers no | 77 // the image is rendered, and automatically pauses once all observers no |
| 78 // longer want to render the image. | 78 // longer want to render the image. |
| 79 void stopAnimation() override; | 79 void stopAnimation() override; |
| 80 void resetAnimation() override; | 80 void resetAnimation() override; |
| 81 bool maybeAnimated() override; | 81 bool maybeAnimated() override; |
| 82 | 82 |
| 83 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP
olicy = policy; } | 83 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP
olicy = policy; } |
| 84 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy;
} | 84 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy;
} |
| 85 void advanceTime(double deltaTimeInSeconds) override; | 85 void advanceTime(double deltaTimeInSeconds) override; |
| 86 | 86 |
| 87 // Advance the image animation by one frame. |
| 88 void advanceAnimationForTesting() override { internalAdvanceAnimation(false)
; } |
| 89 |
| 87 PassRefPtr<SkImage> imageForCurrentFrame() override; | 90 PassRefPtr<SkImage> imageForCurrentFrame() override; |
| 88 PassRefPtr<Image> imageForDefaultFrame() override; | 91 PassRefPtr<Image> imageForDefaultFrame() override; |
| 89 bool currentFrameKnownToBeOpaque() override; | 92 bool currentFrameKnownToBeOpaque() override; |
| 90 bool currentFrameIsComplete() override; | 93 bool currentFrameIsComplete() override; |
| 91 bool currentFrameIsLazyDecoded() override; | 94 bool currentFrameIsLazyDecoded() override; |
| 92 | 95 |
| 93 ImageOrientation currentFrameOrientation(); | 96 ImageOrientation currentFrameOrientation(); |
| 94 | 97 |
| 95 private: | 98 private: |
| 96 friend class BitmapImageTest; | 99 friend class BitmapImageTest; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 191 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
| 189 mutable bool m_hasUniformFrameSize : 1; | 192 mutable bool m_hasUniformFrameSize : 1; |
| 190 mutable bool m_haveFrameCount : 1; | 193 mutable bool m_haveFrameCount : 1; |
| 191 }; | 194 }; |
| 192 | 195 |
| 193 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 196 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 194 | 197 |
| 195 } // namespace blink | 198 } // namespace blink |
| 196 | 199 |
| 197 #endif | 200 #endif |
| OLD | NEW |