Index: cc/animation/transform_operation.cc |
diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc |
index 7421924aedcea56ef9658d47bc2e4c77225404d2..e3b28d965a46733496e25d46bf1af5735d53b3f9 100644 |
--- a/cc/animation/transform_operation.cc |
+++ b/cc/animation/transform_operation.cc |
@@ -32,6 +32,12 @@ static bool IsOperationIdentity(const TransformOperation* operation) { |
return !operation || operation->IsIdentity(); |
} |
+static bool Is3DRotation(const TransformOperation* operation) { |
+ if (IsOperationIdentity(operation)) |
+ return false; |
+ return operation->rotate.axis.x != 0 || operation->rotate.axis.y != 0; |
+} |
+ |
static bool ShareSameAxis(const TransformOperation* from, |
const TransformOperation* to, |
SkMScalar* axis_x, |
@@ -124,7 +130,8 @@ bool TransformOperation::BlendTransformOperations( |
SkMScalar axis_z = 1; |
SkMScalar from_angle = 0; |
SkMScalar to_angle = IsOperationIdentity(to) ? 0 : to->rotate.angle; |
- if (ShareSameAxis(from, to, &axis_x, &axis_y, &axis_z, &from_angle)) { |
+ if (ShareSameAxis(from, to, &axis_x, &axis_y, &axis_z, &from_angle) && |
+ !Is3DRotation(from) && !Is3DRotation(to)) { |
ajuma
2015/06/23 13:24:58
I'm not sure I follow how this corresponds to the
soonm
2015/06/23 23:43:42
Thanks ajuma, I think you're right. I misunderstoo
|
result->RotateAbout(gfx::Vector3dF(axis_x, axis_y, axis_z), |
BlendSkMScalars(from_angle, to_angle, progress)); |
} else { |