OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // some of them start on the compositor thread (but there is no such guarantee | 131 // some of them start on the compositor thread (but there is no such guarantee |
132 // for the effective start time of subsequent elements). Obviously will not | 132 // for the effective start time of subsequent elements). Obviously will not |
133 // work if they animate any common properties. The animator takes ownership | 133 // work if they animate any common properties. The animator takes ownership |
134 // of the animation sequences. | 134 // of the animation sequences. |
135 void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations); | 135 void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations); |
136 | 136 |
137 // Schedules a pause for length |duration| of all the specified properties. | 137 // Schedules a pause for length |duration| of all the specified properties. |
138 // End the list with -1. | 138 // End the list with -1. |
139 void SchedulePauseForProperties( | 139 void SchedulePauseForProperties( |
140 base::TimeDelta duration, | 140 base::TimeDelta duration, |
141 LayerAnimationElement::AnimatableProperty property, | 141 LayerAnimationElement::AnimatableProperties properties_to_pause); |
142 ...); | |
143 | 142 |
144 // Returns true if there is an animation in the queue (animations remain in | 143 // Returns true if there is an animation in the queue (animations remain in |
145 // the queue until they complete, so this includes running animations). | 144 // the queue until they complete, so this includes running animations). |
146 bool is_animating() const { return !animation_queue_.empty(); } | 145 bool is_animating() const { return !animation_queue_.empty(); } |
147 | 146 |
148 // Returns true if there is an animation in the queue that animates the given | 147 // Returns true if there is an animation in the queue that animates the given |
149 // property (animations remain in the queue until they complete, so this | 148 // property (animations remain in the queue until they complete, so this |
150 // includes running animations). | 149 // includes running animations). |
151 bool IsAnimatingProperty( | 150 bool IsAnimatingProperty( |
152 LayerAnimationElement::AnimatableProperty property) const; | 151 LayerAnimationElement::AnimatableProperty property) const; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // Observers are notified when layer animations end, are scheduled or are | 346 // Observers are notified when layer animations end, are scheduled or are |
348 // aborted. | 347 // aborted. |
349 ObserverList<LayerAnimationObserver> observers_; | 348 ObserverList<LayerAnimationObserver> observers_; |
350 | 349 |
351 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 350 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
352 }; | 351 }; |
353 | 352 |
354 } // namespace ui | 353 } // namespace ui |
355 | 354 |
356 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 355 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
OLD | NEW |