Closed Bug 1543974 Opened 1 year ago Closed 1 year ago

Allow reusing render tasks within a frame


(Core :: Graphics: WebRender, task, P3)






(Reporter: nical, Assigned: nical)


(Whiteboard: [wr-q2][wr-april])


(3 files)

There can currently be only one render task reading the input of another task in the render task tree.

We want to be able to have several tasks read the output of another task (effectively turning the render task tree into a render task graph), in order to perform some optimizations such as reusing intermediate work when an item has multiple shadows, and efficiently expressing SVG filter graphs.

Summary: Allow reusing of render tasks within a frame → Allow reusing render tasks within a frame
Type: defect → enhancement
Whiteboard: [wr-q2][wr-april]
Type: enhancement → task

Due to the render task ping-pong target allocation scheme, we need to ensure:

  • that tasks only read from tasks that are an odd number of passes apart,
  • that render task content is kept valid long enough for all of the dependent tasks.

The former is solved in this patch through blit tasks, the latter by marking tasks for saving as needed.

Screenshot of wrench with a stack of 4 shadows and the generated render task graph. Two shadows with identical radii (so they share all render tasks), one with a slightly higher radius that can reuse both down-scale passes but needs its own blur passes, and one with a smaller radius using a single downscale and a blit to resolve the allocation conflict.

Keywords: leave-open
Pushed by
Deal with conflicting render task rect scheduling and allocation. r=kvark
Pushed by
Add render task scheduling tests. r=gw
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.