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