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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void markAnimationsForDeletion(double monotonicTime, AnimationEventsVector*)
; | 102 void markAnimationsForDeletion(double monotonicTime, AnimationEventsVector*)
; |
103 void purgeAnimationsMarkedForDeletion(); | 103 void purgeAnimationsMarkedForDeletion(); |
104 | 104 |
105 void tickAnimations(double monotonicTime); | 105 void tickAnimations(double monotonicTime); |
106 | 106 |
107 void updateActivation(bool force = false); | 107 void updateActivation(bool force = false); |
108 | 108 |
109 void notifyObserversOpacityAnimated(float opacity); | 109 void notifyObserversOpacityAnimated(float opacity); |
110 void notifyObserversTransformAnimated(const gfx::Transform& transform); | 110 void notifyObserversTransformAnimated(const gfx::Transform& transform); |
111 | 111 |
| 112 bool hasActiveObserver(); |
| 113 |
112 // If this is true, we force a sync to the impl thread. | 114 // If this is true, we force a sync to the impl thread. |
113 bool m_forceSync; | 115 bool m_forceSync; |
114 | 116 |
115 AnimationRegistrar* m_registrar; | 117 AnimationRegistrar* m_registrar; |
116 int m_id; | 118 int m_id; |
117 ScopedPtrVector<ActiveAnimation> m_activeAnimations; | 119 ScopedPtrVector<ActiveAnimation> m_activeAnimations; |
118 | 120 |
119 // This is used to ensure that we don't spam the registrar. | 121 // This is used to ensure that we don't spam the registrar. |
120 bool m_isActive; | 122 bool m_isActive; |
121 | 123 |
122 ObserverList<LayerAnimationValueObserver> m_observers; | 124 ObserverList<LayerAnimationValueObserver> m_observers; |
123 | 125 |
124 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 126 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
125 }; | 127 }; |
126 | 128 |
127 } // namespace cc | 129 } // namespace cc |
128 | 130 |
129 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ | 131 #endif // CC_LAYER_ANIMATION_CONTROLLER_H_ |
OLD | NEW |