Bug 1436415 - Part 2: Enable nsIFrame::BuildDisplayListForChild() fast-path when using simple event region items r=mattwoodrow

MozReview-Commit-ID: 77rwS0cDUnn

--HG--
extra : rebase_source : 256cedb216e7e737471da3956b57ca0f876ab306
This commit is contained in:
Miko Mynttinen 2018-02-13 01:55:27 +01:00
Родитель e05dc376a1
Коммит 713a93ce55
1 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -3506,11 +3506,12 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
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());
@ -3792,15 +3793,15 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
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