Bug 1923790. Skip checking for perspective in GetResultingTransformMatrix when we already know there is no perspective. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D225170
This commit is contained in:
Timothy Nikkel 2024-10-14 10:43:06 +00:00
parent 72090a3700
commit 888868356b

View File

@ -3263,11 +3263,14 @@ void nsIFrame::BuildDisplayListForStackingContext(
visibleRect = dirtyRect = aBuilder->GetPreserves3DRect();
}
float appPerDev = PresContext()->AppUnitsPerDevPixel();
const float appPerDev = PresContext()->AppUnitsPerDevPixel();
uint32_t flags = nsDisplayTransform::kTransformRectFlags &
~nsDisplayTransform::OFFSET_BY_ORIGIN;
if (!hasPerspective) {
flags &= ~nsDisplayTransform::INCLUDE_PERSPECTIVE;
}
auto transform = nsDisplayTransform::GetResultingTransformMatrix(
this, nsPoint(), appPerDev,
nsDisplayTransform::kTransformRectFlags &
~nsDisplayTransform::OFFSET_BY_ORIGIN);
this, nsPoint(), appPerDev, flags);
nsRect untransformedDirtyRect;
if (nsDisplayTransform::UntransformRect(dirtyRect, overflow, transform,
appPerDev,