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

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

Issue 2291463003: Revert "CC Animation: Introduce some dirty flags to optimize PushProperties on commit" (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 10 #include "base/macros.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // AnimationDelegate routing. 75 // AnimationDelegate routing.
76 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 76 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
77 TargetProperty::Type target_property, 77 TargetProperty::Type target_property,
78 int group); 78 int group);
79 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 79 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
80 TargetProperty::Type target_property, 80 TargetProperty::Type target_property,
81 int group); 81 int group);
82 void NotifyAnimationAborted(base::TimeTicks monotonic_time, 82 void NotifyAnimationAborted(base::TimeTicks monotonic_time,
83 TargetProperty::Type target_property, 83 TargetProperty::Type target_property,
84 int group); 84 int group);
85 void NotifyAnimationWaitingForDeletion();
86 void NotifyAnimationTakeover(base::TimeTicks monotonic_time, 85 void NotifyAnimationTakeover(base::TimeTicks monotonic_time,
87 TargetProperty::Type target_property, 86 TargetProperty::Type target_property,
88 double animation_start_time, 87 double animation_start_time,
89 std::unique_ptr<AnimationCurve> curve); 88 std::unique_ptr<AnimationCurve> curve);
90 89
91 // Whether this player has animations waiting to get sent to ElementAnimations 90 // Whether this player has animations waiting to get sent to ElementAnimations
92 bool has_pending_animations_for_testing() const { 91 bool has_pending_animations_for_testing() const {
93 return !animations_.empty(); 92 return !animations_.empty();
94 } 93 }
95 94
96 bool needs_push_properties() const { return needs_push_properties_; }
97 void SetNeedsPushProperties();
98
99 private: 95 private:
100 friend class base::RefCounted<AnimationPlayer>; 96 friend class base::RefCounted<AnimationPlayer>;
101 97
102 explicit AnimationPlayer(int id); 98 explicit AnimationPlayer(int id);
103 ~AnimationPlayer(); 99 ~AnimationPlayer();
104 100
101 void SetNeedsCommit();
102
105 void RegisterPlayer(); 103 void RegisterPlayer();
106 void UnregisterPlayer(); 104 void UnregisterPlayer();
107 105
108 void BindElementAnimations(); 106 void BindElementAnimations();
109 void UnbindElementAnimations(); 107 void UnbindElementAnimations();
110 108
111 // We accumulate added animations in animations_ container 109 // We accumulate added animations in animations_ container
112 // if element_animations_ is a nullptr. It allows us to add/remove animations 110 // if element_animations_ is a nullptr. It allows us to add/remove animations
113 // to non-attached AnimationPlayers. 111 // to non-attached AnimationPlayers.
114 std::vector<std::unique_ptr<Animation>> animations_; 112 std::vector<std::unique_ptr<Animation>> animations_;
115 113
116 AnimationHost* animation_host_; 114 AnimationHost* animation_host_;
117 AnimationTimeline* animation_timeline_; 115 AnimationTimeline* animation_timeline_;
118 // element_animations isn't null if player attached to an element (layer). 116 // element_animations isn't null if player attached to an element (layer).
119 scoped_refptr<ElementAnimations> element_animations_; 117 scoped_refptr<ElementAnimations> element_animations_;
120 AnimationDelegate* animation_delegate_; 118 AnimationDelegate* animation_delegate_;
121 119
122 int id_; 120 int id_;
123 ElementId element_id_; 121 ElementId element_id_;
124 bool needs_push_properties_;
125 122
126 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); 123 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer);
127 }; 124 };
128 125
129 } // namespace cc 126 } // namespace cc
130 127
131 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ 128 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698