Closed Bug 2079474 Opened 1 month ago Closed 1 month ago

Draw the content behind a backdrop-filter into its capture instead of resolving it from the backdrop root

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: gw, Assigned: gw)

References

(Blocks 1 open bug)

Details

Attachments

(5 external files, 2 obsolete files)

No description provided.

Each frame, record every reachable backdrop-filter chain's backdrop root,
capture primitive, and the area of the root surface its filters read. Nothing
uses this yet beyond HIGHLIGHT_BACKDROP_FILTERS and a profiler counter.

Copying the backdrop root's pixels required splitting its tasks around every
backdrop-filter. Instead, each primitive behind a filter emits its commands
into the capture's command buffer as well as the root's, so it is still
prepared once, and the capture depends on the same render tasks. The resolve
is now unreachable and is removed in the following patches.

The capture task is cleared and scissored to its content area, since a blur
samples its padding. The deferred dirty test covers the whole capture region,
which a drop shadow can sample beyond the element.

Attachment #9655396 - Attachment description: Bug 2079474 - Pt 1 - Find the region each backdrop-filter samples and the primitives behind it. → WIP: Bug 2079474 - Pt 1 - Find the region each backdrop-filter samples and the primitives behind it.
Attachment #9655397 - Attachment description: Bug 2079474 - Pt 2 - Draw the primitives behind a backdrop-filter into its capture instead of copying them. → WIP: Bug 2079474 - Pt 2 - Draw the primitives behind a backdrop-filter into its capture instead of copying them.
Attachment #9655397 - Attachment is obsolete: true
Attachment #9655396 - Attachment is obsolete: true

Each frame, record every reachable backdrop-filter chain's backdrop root,
capture primitive, and the area of the root surface its filters read. Nothing
uses this yet beyond HIGHLIGHT_BACKDROP_FILTERS.

Copying the backdrop root's pixels required splitting its tasks around every
backdrop-filter. Instead, the capture is open on the backdrop root's surface
from when the root is prepared until the capture's picture is, as one more
target: each primitive behind the element emits its commands into it as well
as the root's, so it is still prepared once, and the capture depends on the
same render tasks. The resolve is now unreachable and is removed in the
following patches.

The capture task is cleared and scissored to its content area, since a blur
samples its padding. The deferred dirty test covers the whole capture region,
which a drop shadow can sample beyond the element.

Nothing registers a resolve source any more, so the backdrop root's tasks are
never split.

Tiles under a backdrop-filter rendered into an enlarged task, copied into the
tile, so that the task could be split for the resolve. Nothing splits tile
tasks any more.

A capture needed a render target of its own for the resolve to copy into. It
now clears and scissors its own task, so it can share one, and a chain's
surface is popped like any other.

Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/419add0ba121 https://hg.mozilla.org/integration/autoland/rev/ea745deba60c Pt 1 - Find the region each backdrop-filter samples. r=gfx-reviewers,nical https://github.com/mozilla-firefox/firefox/commit/082843cfff04 https://hg.mozilla.org/integration/autoland/rev/fb3b55d32e19 Pt 2 - Draw the primitives behind a backdrop-filter into its capture instead of copying them. r=gfx-reviewers,nical https://github.com/mozilla-firefox/firefox/commit/0e80fdc2259c https://hg.mozilla.org/integration/autoland/rev/081c24ee1f83 Pt 3 - Remove the backdrop resolve. r=gfx-reviewers,nical https://github.com/mozilla-firefox/firefox/commit/43c79f86c788 https://hg.mozilla.org/integration/autoland/rev/17b22abfced1 Pt 4 - Remove the enlarged tile tasks and tile composites used for backdrop resolves. r=gfx-reviewers,nical https://github.com/mozilla-firefox/firefox/commit/b51d8c2c35a3 https://hg.mozilla.org/integration/autoland/rev/59fe71d7c538 Pt 5 - Remove the backdrop sub-graph bookkeeping and PictureFlags::IS_RESOLVE_TARGET. r=gfx-reviewers,nical
Regressions: 2084357
QA Whiteboard: [qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: