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/animation/layer_animation_controller.h" | 5 #include "cc/animation/layer_animation_controller.h" |
6 | 6 |
7 #include "cc/animation/animation.h" | 7 #include "cc/animation/animation.h" |
8 #include "cc/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
9 #include "cc/animation/animation_delegate.h" | 9 #include "cc/animation/animation_delegate.h" |
10 #include "cc/animation/keyframed_animation_curve.h" | 10 #include "cc/animation/keyframed_animation_curve.h" |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 cc::Animation::Finished, 0.0); | 1252 cc::Animation::Finished, 0.0); |
1253 | 1253 |
1254 // There are no longer any running animations. | 1254 // There are no longer any running animations. |
1255 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds)); | 1255 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds)); |
1256 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString()); | 1256 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString()); |
1257 | 1257 |
1258 // Add an animation whose bounds we don't yet support computing. | 1258 // Add an animation whose bounds we don't yet support computing. |
1259 scoped_ptr<KeyframedTransformAnimationCurve> curve3( | 1259 scoped_ptr<KeyframedTransformAnimationCurve> curve3( |
1260 KeyframedTransformAnimationCurve::Create()); | 1260 KeyframedTransformAnimationCurve::Create()); |
1261 TransformOperations operations3; | 1261 TransformOperations operations3; |
| 1262 gfx::Transform transform3; |
| 1263 transform3.Scale3d(1.0, 2.0, 3.0); |
1262 curve3->AddKeyframe(TransformKeyframe::Create( | 1264 curve3->AddKeyframe(TransformKeyframe::Create( |
1263 0.0, operations3, scoped_ptr<TimingFunction>())); | 1265 0.0, operations3, scoped_ptr<TimingFunction>())); |
1264 operations3.AppendSkew(1.0, 2.0); | 1266 operations3.AppendMatrix(transform3); |
1265 curve3->AddKeyframe(TransformKeyframe::Create( | 1267 curve3->AddKeyframe(TransformKeyframe::Create( |
1266 1.0, operations3, scoped_ptr<TimingFunction>())); | 1268 1.0, operations3, scoped_ptr<TimingFunction>())); |
1267 animation = Animation::Create( | 1269 animation = Animation::Create( |
1268 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform); | 1270 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform); |
1269 controller_impl->AddAnimation(animation.Pass()); | 1271 controller_impl->AddAnimation(animation.Pass()); |
1270 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds)); | 1272 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds)); |
1271 } | 1273 } |
1272 | 1274 |
1273 } // namespace | 1275 } // namespace |
1274 } // namespace cc | 1276 } // namespace cc |
OLD | NEW |