Bug 1923790. Skip a matrix ChangeBasis in GetResultingTransformMatrix when it's useless. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D225172
This commit is contained in:
Timothy Nikkel 2024-10-14 10:43:07 +00:00
parent f55cca95cd
commit 4e3a1d0815

View File

@ -6236,7 +6236,9 @@ Matrix4x4 nsDisplayTransform::GetResultingTransformMatrixInternal(
}
// Apply any translation due to 'transform-origin' and/or 'transform-box':
result.ChangeBasis(aProperties.mToTransformOrigin);
if (aProperties.mToTransformOrigin != gfx::Point3D()) {
result.ChangeBasis(aProperties.mToTransformOrigin);
}
if (parentHasChildrenOnlyTransform) {
float pixelsPerCSSPx = AppUnitsPerCSSPixel() / aAppUnitsPerPixel;