| 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_ANIMATION_HOST_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_HOST_H_ |
| 6 #define CC_ANIMATION_ANIMATION_HOST_H_ | 6 #define CC_ANIMATION_ANIMATION_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 ScrollOffsetAnimations& scroll_offset_animations() const; | 158 ScrollOffsetAnimations& scroll_offset_animations() const; |
| 159 | 159 |
| 160 // Registers the given element animations as active. An active element | 160 // Registers the given element animations as active. An active element |
| 161 // animations is one that has a running animation that needs to be ticked. | 161 // animations is one that has a running animation that needs to be ticked. |
| 162 void DidActivateElementAnimations(ElementAnimations* element_animations); | 162 void DidActivateElementAnimations(ElementAnimations* element_animations); |
| 163 | 163 |
| 164 // Unregisters the given element animations. When this happens, the | 164 // Unregisters the given element animations. When this happens, the |
| 165 // element animations will no longer be ticked (since it's not active). | 165 // element animations will no longer be ticked (since it's not active). |
| 166 void DidDeactivateElementAnimations(ElementAnimations* element_animations); | 166 void DidDeactivateElementAnimations(ElementAnimations* element_animations); |
| 167 | 167 |
| 168 // Registers the given ElementAnimations as alive. | |
| 169 void RegisterElementAnimations(ElementAnimations* element_animations); | |
| 170 // Unregisters the given ElementAnimations as alive. | |
| 171 void UnregisterElementAnimations(ElementAnimations* element_animations); | |
| 172 | |
| 173 const ElementToAnimationsMap& active_element_animations_for_testing() const; | 168 const ElementToAnimationsMap& active_element_animations_for_testing() const; |
| 174 const ElementToAnimationsMap& all_element_animations_for_testing() const; | 169 const ElementToAnimationsMap& all_element_animations_for_testing() const; |
| 175 | 170 |
| 176 private: | 171 private: |
| 177 explicit AnimationHost(ThreadInstance thread_instance); | 172 explicit AnimationHost(ThreadInstance thread_instance); |
| 178 | 173 |
| 179 void PushTimelinesToImplThread(AnimationHost* host_impl) const; | 174 void PushTimelinesToImplThread(AnimationHost* host_impl) const; |
| 180 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; | 175 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; |
| 181 void PushPropertiesToImplThread(AnimationHost* host_impl); | 176 void PushPropertiesToImplThread(AnimationHost* host_impl); |
| 182 | 177 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 199 | 194 |
| 200 bool supports_scroll_animations_; | 195 bool supports_scroll_animations_; |
| 201 bool needs_push_properties_; | 196 bool needs_push_properties_; |
| 202 | 197 |
| 203 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 198 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
| 204 }; | 199 }; |
| 205 | 200 |
| 206 } // namespace cc | 201 } // namespace cc |
| 207 | 202 |
| 208 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 203 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
| OLD | NEW |