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_TEST_ANIMATION_TEST_COMMON_H_ | 5 #ifndef CC_TEST_ANIMATION_TEST_COMMON_H_ |
6 #define CC_TEST_ANIMATION_TEST_COMMON_H_ | 6 #define CC_TEST_ANIMATION_TEST_COMMON_H_ |
7 | 7 |
8 #include "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/animation/animation_curve.h" | 9 #include "cc/animation/animation_curve.h" |
10 #include "cc/animation/animation_timeline.h" | 10 #include "cc/animation/animation_timeline.h" |
11 #include "cc/animation/element_id.h" | |
12 #include "cc/animation/transform_operations.h" | 11 #include "cc/animation/transform_operations.h" |
13 #include "cc/output/filter_operations.h" | 12 #include "cc/output/filter_operations.h" |
14 #include "cc/test/geometry_test_utils.h" | 13 #include "cc/test/geometry_test_utils.h" |
15 | 14 |
16 namespace cc { | 15 namespace cc { |
17 class AnimationPlayer; | 16 class AnimationPlayer; |
18 class ElementAnimations; | 17 class ElementAnimations; |
19 class LayerImpl; | 18 class LayerImpl; |
20 class Layer; | 19 class Layer; |
21 } | 20 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 double duration, | 110 double duration, |
112 float start_brightness, | 111 float start_brightness, |
113 float end_brightness); | 112 float end_brightness); |
114 | 113 |
115 int AddOpacityStepsToElementAnimations(ElementAnimations* target, | 114 int AddOpacityStepsToElementAnimations(ElementAnimations* target, |
116 double duration, | 115 double duration, |
117 float start_opacity, | 116 float start_opacity, |
118 float end_opacity, | 117 float end_opacity, |
119 int num_steps); | 118 int num_steps); |
120 | 119 |
121 void AddAnimationToElementWithPlayer(ElementId element_id, | 120 void AddAnimationToLayerWithPlayer(int layer_id, |
122 scoped_refptr<AnimationTimeline> timeline, | 121 scoped_refptr<AnimationTimeline> timeline, |
123 std::unique_ptr<Animation> animation); | 122 std::unique_ptr<Animation> animation); |
124 void AddAnimationToElementWithExistingPlayer( | 123 void AddAnimationToLayerWithExistingPlayer( |
125 ElementId element_id, | 124 int layer_id, |
126 scoped_refptr<AnimationTimeline> timeline, | 125 scoped_refptr<AnimationTimeline> timeline, |
127 std::unique_ptr<Animation> animation); | 126 std::unique_ptr<Animation> animation); |
128 | 127 |
129 void RemoveAnimationFromElementWithExistingPlayer( | 128 void RemoveAnimationFromLayerWithExistingPlayer( |
130 ElementId element_id, | 129 int layer_id, |
131 scoped_refptr<AnimationTimeline> timeline, | 130 scoped_refptr<AnimationTimeline> timeline, |
132 int animation_id); | 131 int animation_id); |
133 | 132 |
134 Animation* GetAnimationFromElementWithExistingPlayer( | 133 Animation* GetAnimationFromLayerWithExistingPlayer( |
135 ElementId element_id, | 134 int layer_id, |
136 scoped_refptr<AnimationTimeline> timeline, | 135 scoped_refptr<AnimationTimeline> timeline, |
137 int animation_id); | 136 int animation_id); |
138 | 137 |
139 int AddAnimatedFilterToElementWithPlayer( | 138 int AddAnimatedFilterToLayerWithPlayer( |
140 ElementId element_id, | 139 int layer_id, |
141 scoped_refptr<AnimationTimeline> timeline, | 140 scoped_refptr<AnimationTimeline> timeline, |
142 double duration, | 141 double duration, |
143 float start_brightness, | 142 float start_brightness, |
144 float end_brightness); | 143 float end_brightness); |
145 | 144 |
146 int AddAnimatedTransformToElementWithPlayer( | 145 int AddAnimatedTransformToLayerWithPlayer( |
147 ElementId element_id, | 146 int layer_id, |
148 scoped_refptr<AnimationTimeline> timeline, | 147 scoped_refptr<AnimationTimeline> timeline, |
149 double duration, | 148 double duration, |
150 int delta_x, | 149 int delta_x, |
151 int delta_y); | 150 int delta_y); |
152 | 151 |
153 int AddAnimatedTransformToElementWithPlayer( | 152 int AddAnimatedTransformToLayerWithPlayer( |
154 ElementId element_id, | 153 int layer_id, |
155 scoped_refptr<AnimationTimeline> timeline, | 154 scoped_refptr<AnimationTimeline> timeline, |
156 double duration, | 155 double duration, |
157 TransformOperations start_operations, | 156 TransformOperations start_operations, |
158 TransformOperations operations); | 157 TransformOperations operations); |
159 | 158 |
160 int AddOpacityTransitionToElementWithPlayer( | 159 int AddOpacityTransitionToLayerWithPlayer( |
161 ElementId element_id, | 160 int layer_id, |
162 scoped_refptr<AnimationTimeline> timeline, | 161 scoped_refptr<AnimationTimeline> timeline, |
163 double duration, | 162 double duration, |
164 float start_opacity, | 163 float start_opacity, |
165 float end_opacity, | 164 float end_opacity, |
166 bool use_timing_function); | 165 bool use_timing_function); |
167 | 166 |
168 void AbortAnimationsOnElementWithPlayer( | 167 void AbortAnimationsOnLayerWithPlayer(int layer_id, |
169 ElementId element_id, | 168 scoped_refptr<AnimationTimeline> timeline, |
170 scoped_refptr<AnimationTimeline> timeline, | 169 TargetProperty::Type target_property); |
171 TargetProperty::Type target_property); | |
172 | 170 |
173 } // namespace cc | 171 } // namespace cc |
174 | 172 |
175 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_ | 173 #endif // CC_TEST_ANIMATION_TEST_COMMON_H_ |
OLD | NEW |