Open
Bug 1713168
Opened 4 years ago
Updated 3 years ago
Consider storing display item clipchains in the layout frame tree
Categories
(Core :: Web Painting, enhancement, P3)
Core
Web Painting
Tracking
()
NEW
People
(Reporter: mikokm, Unassigned)
References
(Blocks 2 open bugs)
Details
Gecko stores paint time clipping information in a tree of DisplayItemClipChains
. They are allocated during display list building and stored in display items. The clipchains and display items also store a pointer to ActiveScrolledRoot
that describes what the clip moves with.
This approach has some issues:
- It produces duplicate clipchains (this problem is mitigated by deduplication, but memory allocations still happen)
- Gecko display items are bigger than necessary because they store a pointer to clipchains (twice because it might get mutated)
- Gecko clipchains are always rebuilt for new display items
- WR clipchains are always rebuilt when Gecko display list changes
- Clipchain lifetimes are unclear (clipchains are stored in a tree of reference counted pointers and released when the reference count reaches zero)
I think we could solve most of these issues by moving clipchains from display items to layout frame tree. This might not be easy and probably needs some planning.
Comment 1•3 years ago
|
||
(In reply to Miko Mynttinen from comment #0)
- Gecko display items are bigger than necessary because they store a pointer to clipchains (twice because it might get mutated)
Twice only in WrapList items: https://searchfox.org/mozilla-central/rev/a9e776193401900a8ceffa478ae6e9930e895ca1/layout/painting/nsDisplayList.h#5013
You need to log in
before you can comment on or make changes to this bug.
Description
•