| Index: cc/animation/transform_operations_unittest.cc
|
| diff --git a/cc/animation/transform_operations_unittest.cc b/cc/animation/transform_operations_unittest.cc
|
| index c5fb3c6b8160027c9e0672823a2e91c35b323b75..a5cf7ec96197a499f4c32f0542298bdd5d364b00 100644
|
| --- a/cc/animation/transform_operations_unittest.cc
|
| +++ b/cc/animation/transform_operations_unittest.cc
|
| @@ -441,6 +441,42 @@ TEST(TransformOperationTest, LargeRotationsWithDifferentAxes) {
|
| expected, operations_to.Blend(operations_from, progress));
|
| }
|
|
|
| +TEST(TransformOperationTest, RotationWithSlerpFromZeroDeg) {
|
| + TransformOperations operations_from;
|
| + operations_from.AppendRotate(0, 0, 1, 0);
|
| +
|
| + TransformOperations operations_to;
|
| + operations_to.AppendRotate(0, 1, 0, 450);
|
| +
|
| + SkMScalar progress = 0.5f;
|
| + gfx::Transform matrix_from;
|
| + matrix_from.RotateAbout(gfx::Vector3dF(0, 0, 1), 0);
|
| +
|
| + gfx::Transform matrix_to;
|
| + matrix_to.RotateAbout(gfx::Vector3dF(0, 1, 0), 90);
|
| +
|
| + gfx::Transform expected = matrix_to;
|
| + expected.Blend(matrix_from, progress);
|
| +
|
| + EXPECT_TRANSFORMATION_MATRIX_EQ(
|
| + expected, operations_to.Blend(operations_from, progress));
|
| +}
|
| +
|
| +TEST(TransformOperationTest, RotationWithoutSlerpFromZeroDeg) {
|
| + TransformOperations operations_from;
|
| + operations_from.AppendRotate(0, 0, 1, 0);
|
| +
|
| + TransformOperations operations_to;
|
| + operations_to.AppendRotate(0, 0, 1, 450);
|
| +
|
| + SkMScalar progress = 0.5f;
|
| + gfx::Transform expected;
|
| + expected.RotateAbout(gfx::Vector3dF(0, 0, 1), 225);
|
| +
|
| + EXPECT_TRANSFORMATION_MATRIX_EQ(
|
| + expected, operations_to.Blend(operations_from, progress));
|
| +}
|
| +
|
| TEST(TransformOperationTest, BlendRotationFromIdentity) {
|
| ScopedVector<TransformOperations> identity_operations;
|
| GetIdentityOperations(&identity_operations);
|
|
|