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 <bitset> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
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/animation/target_property.h" |
18 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
19 #include "ui/gfx/geometry/scroll_offset.h" | 20 #include "ui/gfx/geometry/scroll_offset.h" |
20 #include "ui/gfx/transform.h" | 21 #include "ui/gfx/transform.h" |
21 | 22 |
22 namespace gfx { | 23 namespace gfx { |
23 class BoxF; | 24 class BoxF; |
24 class Transform; | 25 class Transform; |
25 } | 26 } |
26 | 27 |
27 namespace cc { | 28 namespace cc { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 bool needs_to_start_animations_for_testing() { | 169 bool needs_to_start_animations_for_testing() { |
169 return needs_to_start_animations_; | 170 return needs_to_start_animations_; |
170 } | 171 } |
171 | 172 |
172 private: | 173 private: |
173 friend class base::RefCounted<LayerAnimationController>; | 174 friend class base::RefCounted<LayerAnimationController>; |
174 | 175 |
175 explicit LayerAnimationController(int id); | 176 explicit LayerAnimationController(int id); |
176 ~LayerAnimationController(); | 177 ~LayerAnimationController(); |
177 | 178 |
178 using TargetProperties = std::unordered_set<int>; | 179 // A set of target properties. TargetProperty must be 0-based enum. |
| 180 using TargetProperties = |
| 181 std::bitset<TargetProperty::LAST_TARGET_PROPERTY + 1>; |
179 | 182 |
180 void PushNewAnimationsToImplThread( | 183 void PushNewAnimationsToImplThread( |
181 LayerAnimationController* controller_impl) const; | 184 LayerAnimationController* controller_impl) const; |
182 void MarkAbortedAnimationsForDeletion( | 185 void MarkAbortedAnimationsForDeletion( |
183 LayerAnimationController* controller_impl) const; | 186 LayerAnimationController* controller_impl) const; |
184 void RemoveAnimationsCompletedOnMainThread( | 187 void RemoveAnimationsCompletedOnMainThread( |
185 LayerAnimationController* controller_impl) const; | 188 LayerAnimationController* controller_impl) const; |
186 void PushPropertiesToImplThread(LayerAnimationController* controller_impl); | 189 void PushPropertiesToImplThread(LayerAnimationController* controller_impl); |
187 | 190 |
188 void StartAnimations(base::TimeTicks monotonic_time); | 191 void StartAnimations(base::TimeTicks monotonic_time); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 250 |
248 bool potentially_animating_transform_for_active_observers_; | 251 bool potentially_animating_transform_for_active_observers_; |
249 bool potentially_animating_transform_for_pending_observers_; | 252 bool potentially_animating_transform_for_pending_observers_; |
250 | 253 |
251 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 254 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
252 }; | 255 }; |
253 | 256 |
254 } // namespace cc | 257 } // namespace cc |
255 | 258 |
256 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ | 259 #endif // CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_ |
OLD | NEW |