Closed Bug 1734740 Opened 3 years ago Closed 3 years ago

Retain spatial tree across display lists

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(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
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5cc276dd61cc 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 gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f664ac371d87 Retain spatial tree across display lists r=gfx-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 3 years 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.

Attachment

General

Created:
Updated:
Size: