Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: cc/animation/animation_player.h

Issue 1734063003: Share animations from compositor to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make NotifyAnimationTakeover pure virtual Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANIMATION_ANIMATION_PLAYER_H_ 5 #ifndef CC_ANIMATION_ANIMATION_PLAYER_H_
6 #define CC_ANIMATION_ANIMATION_PLAYER_H_ 6 #define CC_ANIMATION_ANIMATION_PLAYER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/linked_list.h" 10 #include "base/containers/linked_list.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "cc/animation/animation.h" 14 #include "cc/animation/animation.h"
15 #include "cc/animation/animation_curve.h"
15 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
16 17
17 namespace cc { 18 namespace cc {
18 19
19 class AnimationDelegate; 20 class AnimationDelegate;
20 class AnimationHost; 21 class AnimationHost;
21 class AnimationTimeline; 22 class AnimationTimeline;
22 class ElementAnimations; 23 class ElementAnimations;
23 class LayerAnimationController; 24 class LayerAnimationController;
24 enum class LayerTreeType; 25 enum class LayerTreeType;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 layer_animation_delegate_ = delegate; 63 layer_animation_delegate_ = delegate;
63 } 64 }
64 65
65 void AttachLayer(int layer_id); 66 void AttachLayer(int layer_id);
66 void DetachLayer(); 67 void DetachLayer();
67 68
68 void AddAnimation(scoped_ptr<Animation> animation); 69 void AddAnimation(scoped_ptr<Animation> animation);
69 void PauseAnimation(int animation_id, double time_offset); 70 void PauseAnimation(int animation_id, double time_offset);
70 void RemoveAnimation(int animation_id); 71 void RemoveAnimation(int animation_id);
71 void AbortAnimation(int animation_id); 72 void AbortAnimation(int animation_id);
72 void AbortAnimations(TargetProperty::Type target_property); 73 void AbortAnimations(TargetProperty::Type target_property,
74 bool needs_completion);
73 75
74 void PushPropertiesTo(AnimationPlayer* player_impl); 76 void PushPropertiesTo(AnimationPlayer* player_impl);
75 77
76 // AnimationDelegate routing. 78 // AnimationDelegate routing.
77 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 79 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
78 TargetProperty::Type target_property, 80 TargetProperty::Type target_property,
79 int group); 81 int group);
80 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 82 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
81 TargetProperty::Type target_property, 83 TargetProperty::Type target_property,
82 int group); 84 int group);
83 void NotifyAnimationAborted(base::TimeTicks monotonic_time, 85 void NotifyAnimationAborted(base::TimeTicks monotonic_time,
84 TargetProperty::Type target_property, 86 TargetProperty::Type target_property,
85 int group); 87 int group);
88 void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
89 double animation_start_time,
90 scoped_ptr<AnimationCurve> curve);
86 91
87 // Whether this player has animations waiting to get sent to LAC. 92 // Whether this player has animations waiting to get sent to LAC.
88 bool has_pending_animations_for_testing() const { 93 bool has_pending_animations_for_testing() const {
89 return !animations_.empty(); 94 return !animations_.empty();
90 } 95 }
91 96
92 private: 97 private:
93 friend class base::RefCounted<AnimationPlayer>; 98 friend class base::RefCounted<AnimationPlayer>;
94 99
95 explicit AnimationPlayer(int id); 100 explicit AnimationPlayer(int id);
(...skipping 20 matching lines...) Expand all
116 121
117 int id_; 122 int id_;
118 int layer_id_; 123 int layer_id_;
119 124
120 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); 125 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer);
121 }; 126 };
122 127
123 } // namespace cc 128 } // namespace cc
124 129
125 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ 130 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698