Support snapshotting individal pipelines off screen
Categories
(Core :: Graphics: WebRender, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Regressed 1 open bug)
Details
(Whiteboard: [viewtransitions:m2:gfx])
Attachments
(4 files)
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
The view-transition implementation needs a way to produce snapshots of various elements
before starting the transition without affecting the state of the current scene.
This commit makes this possible by adding the an "offscreen scene" concept to webrender.
Offscreen scenes are one-off scenes that are rendered immediately using a temporary frame
builder, temporary interners, etc. The only way that these offscreen scenes can have an
observable effect is by rendering snapshots into images of the resource cache which can
then be picked up by regular scenes.
To use the API:
- Create a pipeline.
- Build a display list for that pipeline containing snapshotted stacking contexts.
- Invoke Transaction::render_offscreen(pipelind_id).
- Delete the pipeline.
Long term it's worth revisiting whether this would be a good use case for the document API.
Some documents could be associated to a window while other documents remain off-screen.
Documents would have their own frame builder, interners and other retained states except for
the resource cache and gpu_caches that would be shared between all documents. Doing it this
way requires more work but would remove the need for a separate API and concept.
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
This is quite the unsavory hack. For view-transition, the WR layer manager and bridge needs to be able to create a temporary pipeline without altering the one that is associated with the bridge and part of the scene that is being displayed. To do that the layer manager needs a pipeline Id to attach this premporary pipeline to, but allocating pipeline IDs is currently done in the main thread of the parent process and we can't afford the round-trip.
To work around this limitation, the patch makes it so that the pipeline IDs are effectively allocated in pairs. The even number is used for main pipeline ids, and the odd one can be used for temporary pipelines without risking collitions.
Ideally we would only allocate namespace ids (the upper 32 bits of the pipeline id) on the parent process main thread so that webrender bridges have the possibility to manage a large number of pipeline ids.
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Backed out for causing wr failures @ massive-element-below-and-on-top-of-viewport-partially-onscreen-old.html
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
Something odd is happening on android specifically (the nothing-captured.html timeout is the worrying one).
This patch set contains important architectural changes for view-transition that I rather not block on the android failures, but it deserves followup investigations.
Comment 10•1 year ago
|
||
Backed out for causing failures at massive-element-below-and-on-top-of-viewport-partially-onscreen-old.html.
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/eb61a491850c367a4dec2de23bbfc2b82e15ecb3
Failure log: https://treeherder.mozilla.org/logviewer?job_id=512235357&repo=autoland&lineNumber=2775
| Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/35c6d1441032
https://hg.mozilla.org/mozilla-central/rev/93076b04b983
https://hg.mozilla.org/mozilla-central/rev/4c2f11d91585
https://hg.mozilla.org/mozilla-central/rev/ab630cfe622b
https://hg.mozilla.org/mozilla-central/rev/83fa9cde3e29
Updated•1 year ago
|
Description
•