author | Miko Mynttinen <mikokm@gmail.com> |
Tue, 13 Feb 2018 01:55:27 +0100 | |
changeset 456103 | 2c081ff593c6ef33a5874c72381b2e35abc82d6d |
parent 456102 | ac5114349a31700de00d1b5166a451aae89fcb2f |
child 456104 | 6d46b232c926c875b1162c911df68c88632549ff |
push id | 8799 |
push user | mtabara@mozilla.com |
push date | Thu, 01 Mar 2018 16:46:23 +0000 |
treeherder | mozilla-beta@15334014dc67 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1436415 |
milestone | 60.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -3501,21 +3501,22 @@ nsIFrame::BuildDisplayListForChild(nsDis } nsIFrame* child = aChild; if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE) return; aBuilder->ClearWillChangeBudget(child); - const bool doingShortcut = + const bool shortcutPossible = aBuilder->IsPaintingToWindow() && + (aBuilder->IsBuildingLayerEventRegions() || + aBuilder->BuildCompositorHitTestInfo()); + + const bool doingShortcut = shortcutPossible && (child->GetStateBits() & NS_FRAME_SIMPLE_DISPLAYLIST) && - aBuilder->IsPaintingToWindow() && - // This would be changed by the change of preference. - aBuilder->IsBuildingLayerEventRegions() && // Animations may change the value of |HasOpacity()|. !(child->GetContent() && child->GetContent()->MayHaveAnimations()); // dirty rect in child-relative coordinates NS_ASSERTION(aBuilder->GetCurrentFrame() == this, "Wrong coord space!"); const nsPoint offset = child->GetOffsetTo(this); nsRect visible = aBuilder->GetVisibleRect() - offset; @@ -3787,23 +3788,23 @@ nsIFrame::BuildDisplayListForChild(nsDis } else { aLists.BorderBackground()->AppendToTop(eventRegions); } } else { nsDisplayLayerEventRegions* eventRegions = aBuilder->GetLayerEventRegions(); if (eventRegions) { eventRegions->AddFrame(aBuilder, child); } - if (!awayFromCommonPath && - aBuilder->IsPaintingToWindow() && - !buildingForChild.MaybeAnimatedGeometryRoot()) { - // The shortcut is available for the child for next time. - child->AddStateBits(NS_FRAME_SIMPLE_DISPLAYLIST); - } - } + } + } + + if (!awayFromCommonPath && shortcutPossible && + !differentAGR && !buildingForChild.MaybeAnimatedGeometryRoot()) { + // The shortcut is available for the child for next time. + child->AddStateBits(NS_FRAME_SIMPLE_DISPLAYLIST); } if (!pseudoStackingContext) { // THIS IS THE COMMON CASE. // Not a pseudo or real stacking context. Do the simple thing and // return early. aBuilder->AdjustWindowDraggingRegion(child);