Bug 790505, part 1: Have prerendered transform frames pretend that they don't have an opaque region so that we can move them around more efficiently. r=mattwoodrow

This commit is contained in:
Chris Jones 2012-10-02 22:55:50 -07:00
parent 2bb01f2f8e
commit dd55277c3e

View File

@ -3928,7 +3928,14 @@ nsRegion nsDisplayTransform::GetOpaqueRegion(nsDisplayListBuilder *aBuilder,
*aSnap = false;
nsRect untransformedVisible;
float factor = nsPresContext::AppUnitsPerCSSPixel();
if (!UntransformRectMatrix(mVisibleRect, GetTransform(factor), factor, &untransformedVisible)) {
// If we're going to prerender all our content, pretend like we
// don't have opqaue content so that everything under us is rendered
// as well. That will increase graphics memory usage if our frame
// covers the entire window, but it allows our transform to be
// updated extremely cheaply, without invalidating any other
// content.
if (ShouldPrerenderTransformedContent(aBuilder, mFrame) ||
!UntransformRectMatrix(mVisibleRect, GetTransform(factor), factor, &untransformedVisible)) {
return nsRegion();
}