Bug 952977: Convert SnapTransforms to gfx::Matrix r=nical

This commit is contained in:
David Zbarsky
2014-01-27 10:27:20 -05:00
parent 6532ec4040
commit ec82eb78ca
9 changed files with 134 additions and 64 deletions

View File

@@ -39,7 +39,7 @@ BasicContainerLayer::ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToS
// We push groups for container layers if we need to, which always
// are aligned in device space, so it doesn't really matter how we snap
// containers.
gfxMatrix residual;
Matrix residual;
gfx3DMatrix idealTransform = GetLocalTransform()*aTransformToSurface;
idealTransform.ProjectTo2D();
@@ -51,8 +51,9 @@ BasicContainerLayer::ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToS
return;
}
gfx3DMatrix snappedTransform = SnapTransformTranslation(idealTransform, &residual);
ToMatrix4x4(snappedTransform, mEffectiveTransform);
Matrix4x4 ideal;
ToMatrix4x4(idealTransform, ideal);
mEffectiveTransform = SnapTransformTranslation(ideal, &residual);
// We always pass the ideal matrix down to our children, so there is no
// need to apply any compensation using the residual from SnapTransformTranslation.
ComputeEffectiveTransformsForChildren(idealTransform);