style: Fix perspective interpolation.

It's not sound to insert random matrices in random positions in the transform
operation list.

I cannot make any sense of what the old code was trying to do.

Bug: 1458715
Reviewed-by: hiro
MozReview-Commit-ID: 5BtCiueEPlR
This commit is contained in:
Emilio Cobos Álvarez 2018-05-03 10:15:15 +02:00
parent 9d721072f5
commit 0ef70d52f2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 8 additions and 23 deletions

View file

@ -251,11 +251,11 @@ impl ToAnimatedZero for TransformOperation {
generic::TransformOperation::Rotate(_) => {
Ok(generic::TransformOperation::Rotate(Angle::zero()))
},
generic::TransformOperation::Perspective(..) |
generic::TransformOperation::Perspective(ref l) => {
Ok(generic::TransformOperation::Perspective(l.to_animated_zero()?))
},
generic::TransformOperation::AccumulateMatrix { .. } |
generic::TransformOperation::InterpolateMatrix { .. } => {
// Perspective: We convert a perspective function into an equivalent
// ComputedMatrix, and then decompose/interpolate/recompose these matrices.
// AccumulateMatrix/InterpolateMatrix: We do interpolation on
// AccumulateMatrix/InterpolateMatrix by reading it as a ComputedMatrix
// (with layout information), and then do matrix interpolation.