| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_LAYER_ANIMATION_CONTROLLER_H_ | 5 #ifndef CC_LAYER_ANIMATION_CONTROLLER_H_ |
| 6 #define CC_LAYER_ANIMATION_CONTROLLER_H_ | 6 #define CC_LAYER_ANIMATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Animation* getAnimation(int groupId, Animation::TargetProperty) const; | 55 Animation* getAnimation(int groupId, Animation::TargetProperty) const; |
| 56 | 56 |
| 57 // Returns the active animation animating the given property that is either
running, or is | 57 // Returns the active animation animating the given property that is either
running, or is |
| 58 // next to run, if such an animation exists. | 58 // next to run, if such an animation exists. |
| 59 Animation* getAnimation(Animation::TargetProperty) const; | 59 Animation* getAnimation(Animation::TargetProperty) const; |
| 60 | 60 |
| 61 // Returns true if there are any animations that have neither finished nor a
borted. | 61 // Returns true if there are any animations that have neither finished nor a
borted. |
| 62 bool hasActiveAnimation() const; | 62 bool hasActiveAnimation() const; |
| 63 | 63 |
| 64 // Returns true if there are any animations at all to process. | 64 // Returns true if there are any animations at all to process. |
| 65 bool hasAnyAnimation() const { return !m_activeAnimations.isEmpty(); } | 65 bool hasAnyAnimation() const { return !m_activeAnimations.empty(); } |
| 66 | 66 |
| 67 // Returns true if there is an animation currently animating the given prope
rty, or | 67 // Returns true if there is an animation currently animating the given prope
rty, or |
| 68 // if there is an animation scheduled to animate this property in the future
. | 68 // if there is an animation scheduled to animate this property in the future
. |
| 69 bool isAnimatingProperty(Animation::TargetProperty) const; | 69 bool isAnimatingProperty(Animation::TargetProperty) const; |
| 70 | 70 |
| 71 // This is called in response to an animation being started on the impl thre
ad. This | 71 // This is called in response to an animation being started on the impl thre
ad. This |
| 72 // function updates the corresponding main thread animation's start time. | 72 // function updates the corresponding main thread animation's start time. |
| 73 virtual void OnAnimationStarted(const AnimationEvent&) OVERRIDE; | 73 virtual void OnAnimationStarted(const AnimationEvent&) OVERRIDE; |
| 74 | 74 |
| 75 // If a sync is forced, then the next time animation updates are pushed to t
he impl | 75 // If a sync is forced, then the next time animation updates are pushed to t
he impl |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 bool m_isActive; | 122 bool m_isActive; |
| 123 | 123 |
| 124 ObserverList<LayerAnimationValueObserver> m_observers; | 124 ObserverList<LayerAnimationValueObserver> m_observers; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 126 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace cc | 129 } // namespace cc |
| 130 | 130 |
| 131 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ | 131 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |