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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) { | 209 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) { |
210 opacity_ = opacity; | 210 opacity_ = opacity; |
211 } | 211 } |
212 | 212 |
213 void FakeLayerAnimationValueObserver::OnTransformAnimated( | 213 void FakeLayerAnimationValueObserver::OnTransformAnimated( |
214 const gfx::Transform& transform) { | 214 const gfx::Transform& transform) { |
215 transform_ = transform; | 215 transform_ = transform; |
216 } | 216 } |
217 | 217 |
218 void FakeLayerAnimationValueObserver::OnScrollOffsetAnimated( | 218 void FakeLayerAnimationValueObserver::OnScrollOffsetAnimated( |
219 const gfx::Vector2dF& scroll_offset) { | 219 const gfx::ScrollOffset& scroll_offset) { |
220 scroll_offset_ = scroll_offset; | 220 scroll_offset_ = scroll_offset; |
221 } | 221 } |
222 | 222 |
223 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() { | 223 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() { |
224 animation_waiting_for_deletion_ = true; | 224 animation_waiting_for_deletion_ = true; |
225 } | 225 } |
226 | 226 |
227 bool FakeLayerAnimationValueObserver::IsActive() const { | 227 bool FakeLayerAnimationValueObserver::IsActive() const { |
228 return true; | 228 return true; |
229 } | 229 } |
230 | 230 |
231 bool FakeInactiveLayerAnimationValueObserver::IsActive() const { | 231 bool FakeInactiveLayerAnimationValueObserver::IsActive() const { |
232 return false; | 232 return false; |
233 } | 233 } |
234 | 234 |
235 gfx::Vector2dF FakeLayerAnimationValueProvider::ScrollOffsetForAnimation() | 235 gfx::ScrollOffset FakeLayerAnimationValueProvider::ScrollOffsetForAnimation() |
236 const { | 236 const { |
237 return scroll_offset_; | 237 return scroll_offset_; |
238 } | 238 } |
239 | 239 |
240 scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const { | 240 scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const { |
241 return make_scoped_ptr(new FakeFloatTransition(*this)); | 241 return make_scoped_ptr(new FakeFloatTransition(*this)); |
242 } | 242 } |
243 | 243 |
244 int AddOpacityTransitionToController(LayerAnimationController* controller, | 244 int AddOpacityTransitionToController(LayerAnimationController* controller, |
245 double duration, | 245 double duration, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 double duration, | 340 double duration, |
341 float start_brightness, | 341 float start_brightness, |
342 float end_brightness) { | 342 float end_brightness) { |
343 return AddAnimatedFilter(layer->layer_animation_controller(), | 343 return AddAnimatedFilter(layer->layer_animation_controller(), |
344 duration, | 344 duration, |
345 start_brightness, | 345 start_brightness, |
346 end_brightness); | 346 end_brightness); |
347 } | 347 } |
348 | 348 |
349 } // namespace cc | 349 } // namespace cc |
OLD | NEW |