Allow SWGL SwCompositor to split up compositing work between SwComposite and render threads
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: lsalzman, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The render thread currently blocks on the calling thread waiting for composition to finish on the SwComposite thread. Given that SWGL rasterization has completed by then and the renderer thread has nothing to do, it would make more sense to donate it to finishing the composition jobs instead of simply blocking.
This requires keeping a dependency graph of available jobs so that we can track job availability for the job queue across multiple threads.
Further, for large jobs like fullscreen video, we need some useful way of partitioning the job into smaller sections that multiple threads can participate in. Given that SWGL is span-oriented rather than tile-oriented, it makes most sense to split up work into horizontal bands that can be parceled out to threads as needed.
To preserve the scaling ratios supplied to the SWGL composite routines in integer coordinates, this requires adding band clipping parameters so as not to disturb the other parameters that specify the scaling, so SWGL has been extended as such.
The concurrency has been cleaned up to use crossbeam from webrender_api rather than mpsc.
The webrender compositor API needs to be slightly extended with a "start_compositing" hook. We need to know that all add_surface calls have finished for this frame before any subsequent bind/end_frame calls. This allows for the dependency graph to be built up completely as add_surface calls come in, after which when start_compositing is called we know we can safely queue compositing jobs because all dependencies have been fully accounted for.
This seems to gain us quite noticeable speedups on basic_compositor_video.
Assignee | ||
Comment 1•4 years ago
|
||
Comment 3•4 years ago
|
||
bugherder |
Comment 4•4 years ago
|
||
Backed out for perma failures.
Log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314409296&repo=autoland&lineNumber=1012
Backout: https://hg.mozilla.org/integration/autoland/rev/a4b27ed1a68e989feac595960aa9c3dbe16212d8
Comment 5•4 years ago
|
||
Backout merged: https://hg.mozilla.org/mozilla-central/rev/a4b27ed1a68e
Assignee | ||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Description
•