| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void ClearAffectedElementTypes(); | 53 void ClearAffectedElementTypes(); |
| 54 | 54 |
| 55 void ElementRegistered(ElementId element_id, ElementListType list_type); | 55 void ElementRegistered(ElementId element_id, ElementListType list_type); |
| 56 void ElementUnregistered(ElementId element_id, ElementListType list_type); | 56 void ElementUnregistered(ElementId element_id, ElementListType list_type); |
| 57 | 57 |
| 58 void AddPlayer(AnimationPlayer* player); | 58 void AddPlayer(AnimationPlayer* player); |
| 59 void RemovePlayer(AnimationPlayer* player); | 59 void RemovePlayer(AnimationPlayer* player); |
| 60 bool IsEmpty() const; | 60 bool IsEmpty() const; |
| 61 | 61 |
| 62 typedef base::ObserverList<AnimationPlayer> PlayersList; | 62 typedef base::ObserverList<AnimationPlayer> PlayersList; |
| 63 PlayersList& players_list() const { return *players_list_.get(); } | 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); | 69 scoped_refptr<ElementAnimations> element_animations_impl); |
| 70 | 70 |
| 71 void Animate(base::TimeTicks monotonic_time); | 71 void Animate(base::TimeTicks monotonic_time); |
| 72 | 72 |
| 73 void UpdateState(bool start_ready_animations, AnimationEvents* events); | 73 void UpdateState(bool start_ready_animations, AnimationEvents* events); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void OnFilterAnimated(ElementListType list_type, | 192 void OnFilterAnimated(ElementListType list_type, |
| 193 const FilterOperations& filters); | 193 const FilterOperations& filters); |
| 194 void OnOpacityAnimated(ElementListType list_type, float opacity); | 194 void OnOpacityAnimated(ElementListType list_type, float opacity); |
| 195 void OnTransformAnimated(ElementListType list_type, | 195 void OnTransformAnimated(ElementListType list_type, |
| 196 const gfx::Transform& transform); | 196 const gfx::Transform& transform); |
| 197 void OnScrollOffsetAnimated(ElementListType list_type, | 197 void OnScrollOffsetAnimated(ElementListType list_type, |
| 198 const gfx::ScrollOffset& scroll_offset); | 198 const gfx::ScrollOffset& scroll_offset); |
| 199 | 199 |
| 200 static TargetProperties GetPropertiesMaskForAnimationState(); | 200 static TargetProperties GetPropertiesMaskForAnimationState(); |
| 201 | 201 |
| 202 std::unique_ptr<PlayersList> players_list_; | 202 PlayersList players_list_; |
| 203 AnimationHost* animation_host_; | 203 AnimationHost* animation_host_; |
| 204 ElementId element_id_; | 204 ElementId element_id_; |
| 205 | 205 |
| 206 // This is used to ensure that we don't spam the animation host. | 206 // This is used to ensure that we don't spam the animation host. |
| 207 bool is_active_; | 207 bool is_active_; |
| 208 | 208 |
| 209 base::TimeTicks last_tick_time_; | 209 base::TimeTicks last_tick_time_; |
| 210 | 210 |
| 211 bool has_element_in_active_list_; | 211 bool has_element_in_active_list_; |
| 212 bool has_element_in_pending_list_; | 212 bool has_element_in_pending_list_; |
| 213 | 213 |
| 214 bool scroll_offset_animation_was_interrupted_; | 214 bool scroll_offset_animation_was_interrupted_; |
| 215 | 215 |
| 216 bool needs_push_properties_; | 216 bool needs_push_properties_; |
| 217 | 217 |
| 218 PropertyAnimationState active_state_; | 218 PropertyAnimationState active_state_; |
| 219 PropertyAnimationState pending_state_; | 219 PropertyAnimationState pending_state_; |
| 220 | 220 |
| 221 bool needs_update_impl_client_state_; | 221 bool needs_update_impl_client_state_; |
| 222 | 222 |
| 223 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); | 223 DISALLOW_COPY_AND_ASSIGN(ElementAnimations); |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace cc | 226 } // namespace cc |
| 227 | 227 |
| 228 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ | 228 #endif // CC_ANIMATION_ELEMENT_ANIMATIONS_H_ |
| OLD | NEW |