| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void SetDelegate(LayerAnimationDelegate* delegate); | 114 void SetDelegate(LayerAnimationDelegate* delegate); |
| 115 | 115 |
| 116 // Unsubscribe from |cc_layer_| and subscribe to |new_layer|. | 116 // Unsubscribe from |cc_layer_| and subscribe to |new_layer|. |
| 117 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); | 117 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); |
| 118 | 118 |
| 119 // Attach AnimationPlayer to Layer and AnimationTimeline | 119 // Attach AnimationPlayer to Layer and AnimationTimeline |
| 120 void SetCompositor(Compositor* compositor); | 120 void SetCompositor(Compositor* compositor); |
| 121 // Detach AnimationPlayer from Layer and AnimationTimeline | 121 // Detach AnimationPlayer from Layer and AnimationTimeline |
| 122 void ResetCompositor(Compositor* compositor); | 122 void ResetCompositor(Compositor* compositor); |
| 123 | 123 |
| 124 // Whether this animator has animations waiting to get sent to cc::LAC. | |
| 125 bool HasPendingThreadedAnimationsForTesting() const; | |
| 126 cc::AnimationPlayer* GetAnimationPlayerForTesting() const; | 124 cc::AnimationPlayer* GetAnimationPlayerForTesting() const; |
| 127 | 125 |
| 128 // Sets the animation preemption strategy. This determines the behaviour if | 126 // Sets the animation preemption strategy. This determines the behaviour if |
| 129 // a property is set during an animation. The default is | 127 // a property is set during an animation. The default is |
| 130 // IMMEDIATELY_SET_NEW_TARGET (see ImmediatelySetNewTarget below). | 128 // IMMEDIATELY_SET_NEW_TARGET (see ImmediatelySetNewTarget below). |
| 131 void set_preemption_strategy(PreemptionStrategy strategy) { | 129 void set_preemption_strategy(PreemptionStrategy strategy) { |
| 132 preemption_strategy_ = strategy; | 130 preemption_strategy_ = strategy; |
| 133 } | 131 } |
| 134 | 132 |
| 135 PreemptionStrategy preemption_strategy() const { | 133 PreemptionStrategy preemption_strategy() const { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 // ResetCompositor/SetCompositor scope. | 410 // ResetCompositor/SetCompositor scope. |
| 413 // TODO(loyso): Remove it. crbug.com/592873. | 411 // TODO(loyso): Remove it. crbug.com/592873. |
| 414 scoped_refptr<cc::ElementAnimations> element_animations_state_; | 412 scoped_refptr<cc::ElementAnimations> element_animations_state_; |
| 415 | 413 |
| 416 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 414 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
| 417 }; | 415 }; |
| 418 | 416 |
| 419 } // namespace ui | 417 } // namespace ui |
| 420 | 418 |
| 421 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 419 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| OLD | NEW |