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 <unordered_map> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/containers/scoped_ptr_hash_map.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/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "cc/animation/animation.h" | 15 #include "cc/animation/animation.h" |
16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
17 #include "cc/trees/mutator_host_client.h" | 17 #include "cc/trees/mutator_host_client.h" |
18 #include "ui/gfx/geometry/box_f.h" | 18 #include "ui/gfx/geometry/box_f.h" |
19 #include "ui/gfx/geometry/vector2d_f.h" | 19 #include "ui/gfx/geometry/vector2d_f.h" |
20 | 20 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void PushTimelinesToImplThread(AnimationHost* host_impl) const; | 160 void PushTimelinesToImplThread(AnimationHost* host_impl) const; |
161 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; | 161 void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const; |
162 void PushPropertiesToImplThread(AnimationHost* host_impl); | 162 void PushPropertiesToImplThread(AnimationHost* host_impl); |
163 | 163 |
164 void EraseTimelines(AnimationTimelineList::iterator begin, | 164 void EraseTimelines(AnimationTimelineList::iterator begin, |
165 AnimationTimelineList::iterator end); | 165 AnimationTimelineList::iterator end); |
166 | 166 |
167 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object | 167 // TODO(loyso): For now AnimationPlayers share LayerAnimationController object |
168 // if they are attached to the same element(layer). Note that Element can | 168 // if they are attached to the same element(layer). Note that Element can |
169 // contain many Layers. | 169 // contain many Layers. |
170 typedef base::ScopedPtrHashMap<int, scoped_ptr<ElementAnimations>> | 170 using LayerToElementAnimationsMap = |
171 LayerToElementAnimationsMap; | 171 std::unordered_map<int, scoped_ptr<ElementAnimations>>; |
172 LayerToElementAnimationsMap layer_to_element_animations_map_; | 172 LayerToElementAnimationsMap layer_to_element_animations_map_; |
173 | 173 |
174 AnimationTimelineList timelines_; | 174 AnimationTimelineList timelines_; |
175 scoped_ptr<AnimationRegistrar> animation_registrar_; | 175 scoped_ptr<AnimationRegistrar> animation_registrar_; |
176 MutatorHostClient* mutator_host_client_; | 176 MutatorHostClient* mutator_host_client_; |
177 | 177 |
178 class ScrollOffsetAnimations; | 178 class ScrollOffsetAnimations; |
179 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; | 179 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; |
180 | 180 |
181 const ThreadInstance thread_instance_; | 181 const ThreadInstance thread_instance_; |
182 | 182 |
183 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 183 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
184 }; | 184 }; |
185 | 185 |
186 } // namespace cc | 186 } // namespace cc |
187 | 187 |
188 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 188 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
OLD | NEW |