OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_LAYER_ANIMATION_CONTROLLER_H_ | 5 #ifndef CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
6 #define CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 6 #define CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
7 | 7 |
| 8 #include <unordered_set> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/containers/hash_tables.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/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "cc/animation/animation.h" | 16 #include "cc/animation/animation.h" |
17 #include "cc/animation/layer_animation_event_observer.h" | 17 #include "cc/animation/layer_animation_event_observer.h" |
18 #include "cc/base/cc_export.h" | 18 #include "cc/base/cc_export.h" |
19 #include "ui/gfx/geometry/scroll_offset.h" | 19 #include "ui/gfx/geometry/scroll_offset.h" |
20 #include "ui/gfx/transform.h" | 20 #include "ui/gfx/transform.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return needs_to_start_animations_; | 168 return needs_to_start_animations_; |
169 } | 169 } |
170 | 170 |
171 protected: | 171 protected: |
172 friend class base::RefCounted<LayerAnimationController>; | 172 friend class base::RefCounted<LayerAnimationController>; |
173 | 173 |
174 explicit LayerAnimationController(int id); | 174 explicit LayerAnimationController(int id); |
175 virtual ~LayerAnimationController(); | 175 virtual ~LayerAnimationController(); |
176 | 176 |
177 private: | 177 private: |
178 typedef base::hash_set<int> TargetProperties; | 178 using TargetProperties = std::unordered_set<int>; |
179 | 179 |
180 void PushNewAnimationsToImplThread( | 180 void PushNewAnimationsToImplThread( |
181 LayerAnimationController* controller_impl) const; | 181 LayerAnimationController* controller_impl) const; |
182 void MarkAbortedAnimationsForDeletion( | 182 void MarkAbortedAnimationsForDeletion( |
183 LayerAnimationController* controller_impl) const; | 183 LayerAnimationController* controller_impl) const; |
184 void RemoveAnimationsCompletedOnMainThread( | 184 void RemoveAnimationsCompletedOnMainThread( |
185 LayerAnimationController* controller_impl) const; | 185 LayerAnimationController* controller_impl) const; |
186 void PushPropertiesToImplThread(LayerAnimationController* controller_impl); | 186 void PushPropertiesToImplThread(LayerAnimationController* controller_impl); |
187 | 187 |
188 void StartAnimations(base::TimeTicks monotonic_time); | 188 void StartAnimations(base::TimeTicks monotonic_time); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 bool potentially_animating_transform_for_active_observers_; | 248 bool potentially_animating_transform_for_active_observers_; |
249 bool potentially_animating_transform_for_pending_observers_; | 249 bool potentially_animating_transform_for_pending_observers_; |
250 | 250 |
251 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 251 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
252 }; | 252 }; |
253 | 253 |
254 } // namespace cc | 254 } // namespace cc |
255 | 255 |
256 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 256 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
OLD | NEW |