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

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

Issue 2554773002: CC Animation: Rename Active Players to Ticking Players. (Closed)
Patch Set: Rename the argument. Created 4 years 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_player_unittest.cc ('k') | cc/animation/element_animations.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_ELEMENT_ANIMATIONS_H_ 5 #ifndef CC_ANIMATION_ELEMENT_ANIMATIONS_H_
6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 6 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 namespace cc { 25 namespace cc {
26 26
27 class AnimationHost; 27 class AnimationHost;
28 class AnimationPlayer; 28 class AnimationPlayer;
29 class FilterOperations; 29 class FilterOperations;
30 enum class ElementListType; 30 enum class ElementListType;
31 struct AnimationEvent; 31 struct AnimationEvent;
32 32
33 enum class ActivationType { NORMAL, FORCE }; 33 enum class UpdateTickingType { NORMAL, FORCE };
34 34
35 // An ElementAnimations owns a list of all AnimationPlayers, attached to 35 // An ElementAnimations owns a list of all AnimationPlayers, attached to
36 // the element. 36 // the element.
37 // This is a CC counterpart for blink::ElementAnimations (in 1:1 relationship). 37 // This is a CC counterpart for blink::ElementAnimations (in 1:1 relationship).
38 // No pointer to/from respective blink::ElementAnimations object for now. 38 // No pointer to/from respective blink::ElementAnimations object for now.
39 class CC_ANIMATION_EXPORT ElementAnimations 39 class CC_ANIMATION_EXPORT ElementAnimations
40 : public base::RefCounted<ElementAnimations> { 40 : public base::RefCounted<ElementAnimations> {
41 public: 41 public:
42 static scoped_refptr<ElementAnimations> Create(); 42 static scoped_refptr<ElementAnimations> Create();
43 43
(...skipping 19 matching lines...) Expand all
63 const PlayersList& players_list() const { return players_list_; } 63 const PlayersList& players_list() const { return players_list_; }
64 64
65 // Ensures that the list of active animations on the main thread and the impl 65 // Ensures that the list of active animations on the main thread and the impl
66 // thread are kept in sync. This function does not take ownership of the impl 66 // thread are kept in sync. This function does not take ownership of the impl
67 // thread ElementAnimations. 67 // thread ElementAnimations.
68 void PushPropertiesTo( 68 void PushPropertiesTo(
69 scoped_refptr<ElementAnimations> element_animations_impl) const; 69 scoped_refptr<ElementAnimations> element_animations_impl) const;
70 70
71 // Returns true if there are any animations that have neither finished nor 71 // Returns true if there are any animations that have neither finished nor
72 // aborted. 72 // aborted.
73 bool HasActiveAnimation() const; 73 bool HasTickingAnimation() const;
74 74
75 // Returns true if there are any animations at all to process. 75 // Returns true if there are any animations at all to process.
76 bool HasAnyAnimation() const; 76 bool HasAnyAnimation() const;
77 77
78 bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; 78 bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const;
79 79
80 // Returns true if there is an animation that is either currently animating 80 // Returns true if there is an animation that is either currently animating
81 // the given property or scheduled to animate this property in the future, and 81 // the given property or scheduled to animate this property in the future, and
82 // that affects the given tree type. 82 // that affects the given tree type.
83 bool IsPotentiallyAnimatingProperty(TargetProperty::Type target_property, 83 bool IsPotentiallyAnimatingProperty(TargetProperty::Type target_property,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void OnFilterAnimated(ElementListType list_type, 168 void OnFilterAnimated(ElementListType list_type,
169 const FilterOperations& filters); 169 const FilterOperations& filters);
170 void OnOpacityAnimated(ElementListType list_type, float opacity); 170 void OnOpacityAnimated(ElementListType list_type, float opacity);
171 void OnTransformAnimated(ElementListType list_type, 171 void OnTransformAnimated(ElementListType list_type,
172 const gfx::Transform& transform); 172 const gfx::Transform& transform);
173 void OnScrollOffsetAnimated(ElementListType list_type, 173 void OnScrollOffsetAnimated(ElementListType list_type,
174 const gfx::ScrollOffset& scroll_offset); 174 const gfx::ScrollOffset& scroll_offset);
175 175
176 static TargetProperties GetPropertiesMaskForAnimationState(); 176 static TargetProperties GetPropertiesMaskForAnimationState();
177 177
178 void UpdateActivation(ActivationType activation_type) const; 178 void UpdatePlayersTickingState(UpdateTickingType update_ticking_type) const;
179 void Deactivate() const; 179 void RemovePlayersFromTicking() const;
180 180
181 PlayersList players_list_; 181 PlayersList players_list_;
182 AnimationHost* animation_host_; 182 AnimationHost* animation_host_;
183 ElementId element_id_; 183 ElementId element_id_;
184 184
185 bool has_element_in_active_list_; 185 bool has_element_in_active_list_;
186 bool has_element_in_pending_list_; 186 bool has_element_in_pending_list_;
187 187
188 mutable bool needs_push_properties_; 188 mutable bool needs_push_properties_;
189 189
190 PropertyAnimationState active_state_; 190 PropertyAnimationState active_state_;
191 PropertyAnimationState pending_state_; 191 PropertyAnimationState pending_state_;
192 192
193 mutable bool needs_update_impl_client_state_; 193 mutable bool needs_update_impl_client_state_;
194 194
195 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); 195 DISALLOW_COPY_AND_ASSIGN(ElementAnimations);
196 }; 196 };
197 197
198 } // namespace cc 198 } // namespace cc
199 199
200 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ 200 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_player_unittest.cc ('k') | cc/animation/element_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698