Add support for sub-graphs to surface building
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: gw, Assigned: gw)
References
Details
Attachments
(1 file)
Assignee | ||
Comment 1•2 years ago
|
||
The CSS backdrop-filter effect relies on reading the current surface
background, applying an arbitrary (css/svg) filter graph to it, and
then continuing rendering on the initial surface.
Consider that we have a parent surface A, which consists of some
primitives, followed by a backdrop-filter, followed by more primitives.
The backdrop-filter in this case is a chained filter - opacity followed
by a sepia effect. In this case the backdrop-filter effect is a simple
chain, however it can be an arbitrary graph, and may contain intermediate
tasks as well (e.g. for blur downsampling). Additionally, assume that
parent surface A is a simple surface, though in reality much of the
complexity in this patch comes from cases where A is a tiled surface
that consists of a number of native compositor surfaces.
The resulting render task graph will be:
A(1) <- S <- O <- A(0)
There will be two render tasks created for A, both attached to the
same backing content surface (which may be a render target or a native
compositor tile). Primitives added prior to the backdrop filter will
be added to task A, phase 0. Then, an opacity task is created that
depends on A(0). The opacity task in this case will become a resolve
target, ensuring that it's a single surface even if A is in fact a
series of tiles intersected by the backdrop-filter primitive. The
sepia task is created, as a child of the opacity task. Finally, a
new task A, phase 1 is created for rendering the output of the backdrop
filter, and any subsequent content. Since A(1) is bound to the same
backing surface as A(0) but does not clear the target, we can continue
rendering the remaining primitives.
Updated•2 years ago
|
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af0c1ff4ce29 Add support for sub-graphs to surface builder r=gfx-reviewers,nical
Comment 3•2 years ago
|
||
bugherder |
Description
•