Closed Bug 1419021 Opened 6 years ago Closed 6 years ago

Retain display list when there are no changes

Categories

(Core :: Web Painting, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mikokm, Assigned: mattwoodrow)

References

Details

Attachments

(2 files)

Currently we try to build a retained display list only when the display root frame has a modified frames list property set [1][2]. This arbitrary requirement disables the most beneficial case of completely skipping the display list building, when the resulting display list would be identical to the old list.

I tried to remove this restriction as a part of bug 1415485. Unfortunately this uncovered bug 1417601, and more recently, the regressions with WPT /css/CSS2/backgrounds/.

[1]: https://searchfox.org/mozilla-central/rev/c633ffa4c4611f202ca11270dcddb7b29edddff8/layout/base/nsLayoutUtils.cpp#3819
[2]: https://searchfox.org/mozilla-central/rev/c633ffa4c4611f202ca11270dcddb7b29edddff8/layout/generic/nsFrame.cpp#1055
Comment on attachment 8936921 [details] [diff] [review]
Part 2: Don't do a full display list build when there are no modified frames

Review of attachment 8936921 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/painting/RetainedDisplayListBuilder.cpp
@@ +801,5 @@
>      GetModifiedFrames(mBuilder.RootReferenceFrame());
>  
>    // Do not allow partial builds if the retained display list is empty, or if
>    // ShouldBuildPartial heuristic fails.
> +  const bool shouldBuildPartial = !mList.IsEmpty() && ShouldBuildPartial(modifiedFrames);

nit: Could you please keep the line break here?
Attachment #8936921 - Flags: review?(mikokm) → review+
Priority: -- → P2
Attachment #8936920 - Flags: review?(tnikkel) → review+
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d4f37b2ab23
Part 1: Invalidate display items when we get a size for decoded images since this can change the display items we build. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b56d4134b33
Part 2: Don't do a full display list build when there are no modified frames. r=miko
https://hg.mozilla.org/mozilla-central/rev/5d4f37b2ab23
https://hg.mozilla.org/mozilla-central/rev/0b56d4134b33
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.