Closed Bug 1441796 Opened 2 years ago Closed 2 years ago

Avoid unnecessary work in nsIFrame::BuildDisplayListForStackingContext() and nsIFrame::BuildDisplayListForChild()

Categories

(Core :: Web Painting, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: miko, Assigned: miko)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

There seems to be some low-hanging fruit in nsIFrame::BuildDisplayListForStackingContext() and nsIFrame::BuildDisplayListForChild() that would improve display list building performance.

Some examples from the top of my head:
- In BuildDisplayListForChild() we do various checks to see whether we are able to use a shortcut to improve consecutive display list builds when the frame is not a stacking context or pseudo stacking context. The problem is that we do these checks even if we have already established that the shortcut is not possible.

- After the changes in bug 1436510 and/or bug 1431249 land, the perspective index incrementing bug 1416991 introduced is no longer needed.

- AutoSaveRestorePerspectiveIndex could use the previously fetched StyleDisplay

- HasPerspective() is always false if IsTransformed() is false.
Priority: -- → P3
Assignee: nobody → mikokm
Status: NEW → ASSIGNED
Comment on attachment 8962797 [details]
Bug 1441796 - Part 3: Reuse the results in nsIFrame::BuildDisplayListForStackingContext() for ChildrenHavePerspective(), IsTransformed(), and Combines3DTransformWithAncestors()

https://reviewboard.mozilla.org/r/231646/#review237702
Attachment #8962797 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8962796 [details]
Bug 1441796 - Part 2: Undo changes from bug 1416991

https://reviewboard.mozilla.org/r/231644/#review237704
Attachment #8962796 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8962795 [details]
Bug 1441796 - Part 1: Optimize the (pseudo)-stacking context conditions

https://reviewboard.mozilla.org/r/231642/#review237714
Attachment #8962795 - Flags: review?(matt.woodrow) → review+
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/bda915184656
Part 1: Optimize the (pseudo)-stacking context conditions r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/e3f4aa48f57f
Part 2: Undo changes from bug 1416991 r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/531edfcfd73c
Part 3: Reuse the results in nsIFrame::BuildDisplayListForStackingContext() for ChildrenHavePerspective(), IsTransformed(), and Combines3DTransformWithAncestors() r=mattwoodrow
https://hg.mozilla.org/mozilla-central/rev/bda915184656
https://hg.mozilla.org/mozilla-central/rev/e3f4aa48f57f
https://hg.mozilla.org/mozilla-central/rev/531edfcfd73c
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Depends on: 1512244
You need to log in before you can comment on or make changes to this bug.