Closed Bug 1734740 Opened 4 months ago Closed 3 months ago

Retain spatial tree across display lists


(Core :: Graphics: WebRender, task)




95 Branch
Tracking Status
firefox95 --- fixed


(Reporter: gw, Assigned: gw)


(Regressed 1 open bug)



(1 file)

No description provided.

With this change, the spatial tree is no longer rebuilt
every time a new display arrives and a scene is built.

Instead, scene building maintains a hash map of spatial
node keys <-> indices, allowing any spatial node that
has been recently seen in a display list to be retained.

Scene building then checks if the node is equivalent or
has been modified since the last display list, and sends
these delta changes as part of the scene swap to the
frame building code. The frame building code applies
the deltas to each updated spatial node.

The primary benefits of this are:

  • Spatial node indices are now stable across display lists,
    allowing future interning of primitives and clips to
    include the spatial node. This can be used for various
    optimizations, including interning during DL building,
    caching transform state, reducing size of PrimitiveInstance

  • Frame building now knows exactly which spatial nodes are
    new, removed, updated or unchanged. We can make this of
    this to cache a lot of the (mostly) redundant calculations
    that are done during both scene and frame building.

Assignee: nobody → gwatson
Pushed by
Retain spatial tree across display lists r=gfx-reviewers,nical

Still investigating what would cause that timeout, it seems unrelated to the patch. It's possibly a general performance issue causing a timeout, will dig in to that before considering disabling that tsan test.

Flags: needinfo?(gwatson)
Pushed by
Retain spatial tree across display lists r=gfx-reviewers,nical
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Depends on: 1736069
Regressions: 1736069
Regressions: 1743152
No longer depends on: 1736069
Regressions: 1747345
You need to log in before you can comment on or make changes to this bug.