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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/scoped_ptr_hash_map.h" | 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_events.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" |
| 19 #include "ui/gfx/geometry/vector2d_f.h" |
18 | 20 |
19 namespace gfx { | 21 namespace gfx { |
20 class ScrollOffset; | 22 class ScrollOffset; |
21 } | 23 } |
22 | 24 |
23 namespace cc { | 25 namespace cc { |
24 | 26 |
| 27 class AnimationEvents; |
25 class AnimationPlayer; | 28 class AnimationPlayer; |
26 class AnimationRegistrar; | 29 class AnimationRegistrar; |
27 class AnimationTimeline; | 30 class AnimationTimeline; |
28 class ElementAnimations; | 31 class ElementAnimations; |
29 class LayerAnimationController; | 32 class LayerAnimationController; |
30 class LayerTreeHost; | 33 class LayerTreeHost; |
31 | 34 |
32 enum class ThreadInstance { MAIN, IMPL }; | 35 enum class ThreadInstance { MAIN, IMPL }; |
33 | 36 |
34 typedef std::vector<scoped_refptr<AnimationTimeline>> AnimationTimelineList; | 37 typedef std::vector<scoped_refptr<AnimationTimeline>> AnimationTimelineList; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return animation_registrar_.get(); | 84 return animation_registrar_.get(); |
82 } | 85 } |
83 | 86 |
84 void SetSupportsScrollAnimations(bool supports_scroll_animations); | 87 void SetSupportsScrollAnimations(bool supports_scroll_animations); |
85 bool SupportsScrollAnimations() const; | 88 bool SupportsScrollAnimations() const; |
86 bool NeedsAnimateLayers() const; | 89 bool NeedsAnimateLayers() const; |
87 | 90 |
88 bool ActivateAnimations(); | 91 bool ActivateAnimations(); |
89 bool AnimateLayers(base::TimeTicks monotonic_time); | 92 bool AnimateLayers(base::TimeTicks monotonic_time); |
90 bool UpdateAnimationState(bool start_ready_animations, | 93 bool UpdateAnimationState(bool start_ready_animations, |
91 AnimationEventsVector* events); | 94 AnimationEvents* events); |
92 | 95 |
93 scoped_ptr<AnimationEventsVector> CreateEvents(); | 96 scoped_ptr<AnimationEvents> CreateEvents(); |
94 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events); | 97 void SetAnimationEvents(scoped_ptr<AnimationEvents> events); |
95 | 98 |
96 bool ScrollOffsetAnimationWasInterrupted(int layer_id) const; | 99 bool ScrollOffsetAnimationWasInterrupted(int layer_id) const; |
97 | 100 |
98 bool IsAnimatingFilterProperty(int layer_id, LayerTreeType tree_type) const; | 101 bool IsAnimatingFilterProperty(int layer_id, LayerTreeType tree_type) const; |
99 bool IsAnimatingOpacityProperty(int layer_id, LayerTreeType tree_type) const; | 102 bool IsAnimatingOpacityProperty(int layer_id, LayerTreeType tree_type) const; |
100 bool IsAnimatingTransformProperty(int layer_id, | 103 bool IsAnimatingTransformProperty(int layer_id, |
101 LayerTreeType tree_type) const; | 104 LayerTreeType tree_type) const; |
102 | 105 |
103 bool HasPotentiallyRunningFilterAnimation(int layer_id, | 106 bool HasPotentiallyRunningFilterAnimation(int layer_id, |
104 LayerTreeType tree_type) const; | 107 LayerTreeType tree_type) const; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; | 177 scoped_ptr<ScrollOffsetAnimations> scroll_offset_animations_; |
175 | 178 |
176 const ThreadInstance thread_instance_; | 179 const ThreadInstance thread_instance_; |
177 | 180 |
178 DISALLOW_COPY_AND_ASSIGN(AnimationHost); | 181 DISALLOW_COPY_AND_ASSIGN(AnimationHost); |
179 }; | 182 }; |
180 | 183 |
181 } // namespace cc | 184 } // namespace cc |
182 | 185 |
183 #endif // CC_ANIMATION_ANIMATION_HOST_H_ | 186 #endif // CC_ANIMATION_ANIMATION_HOST_H_ |
OLD | NEW |