зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1567889 - Part 2: Avoid will-change budget lookups if the frame does not have the will-change bit set r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38852 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ccab3f6249
Коммит
5ffddb5a57
|
@ -3895,7 +3895,6 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nsIFrame* child = aChild;
|
||||
aBuilder->RemoveFromWillChangeBudget(child);
|
||||
|
||||
const bool isPaintingToWindow = aBuilder->IsPaintingToWindow();
|
||||
const bool doingShortcut =
|
||||
|
@ -3904,6 +3903,8 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
// Animations may change the stacking context state.
|
||||
!(child->MayHaveTransformAnimation() || child->MayHaveOpacityAnimation());
|
||||
|
||||
aBuilder->RemoveFromWillChangeBudget(child);
|
||||
|
||||
if (StaticPrefs::layout_css_scroll_anchoring_highlight()) {
|
||||
if (child->FirstContinuation()->IsScrollAnchor()) {
|
||||
nsRect bounds = child->GetContentRectRelativeToSelf() +
|
||||
|
|
|
@ -2549,6 +2549,11 @@ bool nsDisplayListBuilder::IsInWillChangeBudget(nsIFrame* aFrame,
|
|||
}
|
||||
|
||||
void nsDisplayListBuilder::RemoveFromWillChangeBudget(nsIFrame* aFrame) {
|
||||
if (!aFrame->MayHaveWillChangeBudget()) {
|
||||
MOZ_ASSERT(!mWillChangeBudgetSet.Contains(aFrame));
|
||||
return;
|
||||
}
|
||||
|
||||
FrameWillChangeBudget* frameBudget = mWillChangeBudgetSet.GetValue(aFrame);
|
||||
|
||||
if (!frameBudget) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче