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 #include "cc/test/animation_test_common.h" | 5 #include "cc/test/animation_test_common.h" |
6 | 6 |
7 #include "cc/animation/animation_id_provider.h" | 7 #include "cc/animation/animation_id_provider.h" |
8 #include "cc/animation/keyframed_animation_curve.h" | 8 #include "cc/animation/keyframed_animation_curve.h" |
9 #include "cc/animation/layer_animation_controller.h" | 9 #include "cc/animation/layer_animation_controller.h" |
10 #include "cc/animation/transform_operations.h" | 10 #include "cc/animation/transform_operations.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) { | 199 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) { |
200 opacity_ = opacity; | 200 opacity_ = opacity; |
201 } | 201 } |
202 | 202 |
203 void FakeLayerAnimationValueObserver::OnTransformAnimated( | 203 void FakeLayerAnimationValueObserver::OnTransformAnimated( |
204 const gfx::Transform& transform) { | 204 const gfx::Transform& transform) { |
205 transform_ = transform; | 205 transform_ = transform; |
206 } | 206 } |
207 | 207 |
| 208 void FakeLayerAnimationValueObserver::OnScrollOffsetAnimated( |
| 209 gfx::Vector2dF scroll_offset) { |
| 210 scroll_offset_ = scroll_offset; |
| 211 } |
| 212 |
208 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() { | 213 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() { |
209 animation_waiting_for_deletion_ = true; | 214 animation_waiting_for_deletion_ = true; |
210 } | 215 } |
211 | 216 |
212 bool FakeLayerAnimationValueObserver::IsActive() const { | 217 bool FakeLayerAnimationValueObserver::IsActive() const { |
213 return true; | 218 return true; |
214 } | 219 } |
215 | 220 |
216 bool FakeInactiveLayerAnimationValueObserver::IsActive() const { | 221 bool FakeInactiveLayerAnimationValueObserver::IsActive() const { |
217 return false; | 222 return false; |
218 } | 223 } |
219 | 224 |
| 225 gfx::Vector2dF FakeLayerAnimationValueProvider::ScrollOffsetForAnimation() |
| 226 const { |
| 227 return scroll_offset_; |
| 228 } |
| 229 |
220 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::Clone() const { | 230 scoped_ptr<cc::AnimationCurve> FakeFloatTransition::Clone() const { |
221 return make_scoped_ptr( | 231 return make_scoped_ptr( |
222 new FakeFloatTransition(*this)).PassAs<cc::AnimationCurve>(); | 232 new FakeFloatTransition(*this)).PassAs<cc::AnimationCurve>(); |
223 } | 233 } |
224 | 234 |
225 int AddOpacityTransitionToController(cc::LayerAnimationController* controller, | 235 int AddOpacityTransitionToController(cc::LayerAnimationController* controller, |
226 double duration, | 236 double duration, |
227 float start_opacity, | 237 float start_opacity, |
228 float end_opacity, | 238 float end_opacity, |
229 bool use_timing_function) { | 239 bool use_timing_function) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 double duration, | 314 double duration, |
305 float start_brightness, | 315 float start_brightness, |
306 float end_brightness) { | 316 float end_brightness) { |
307 return AddAnimatedFilter(layer->layer_animation_controller(), | 317 return AddAnimatedFilter(layer->layer_animation_controller(), |
308 duration, | 318 duration, |
309 start_brightness, | 319 start_brightness, |
310 end_brightness); | 320 end_brightness); |
311 } | 321 } |
312 | 322 |
313 } // namespace cc | 323 } // namespace cc |
OLD | NEW |