Restructure surface pool into a buffer pool
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: rmader, Assigned: rmader)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Up until now SurfacePoolWayland
was a pool of actual wl_surface
s, as before bug 1718569 we had no direct access to wl_buffer
s when using EGL. However, the way SurfacePoolCA
manages native surfaces is closer to what in Wayland terminology would be a buffer pool: buffers are heavy-weight and expansive to allocate, while wl_surface
objects are cheap to recreate.
So instead of having a pool of surfaces, each of them having it's own pool of buffers, make wl_surface
s part of tiles and make SurfacePoolWayland
manage wl_buffer
s (in the form of SHM- or DMABuf buffers). This will not only allow us to share buffers more efficiently but also simplify our tile management logic.
Most importantly, we'll need to reorder wl_surface
s less often and less complex (no place_below
the parent surface) and can also drop reattaching subsurfaces to compositors. Especially the former will likely decrease CPU time in compositors.
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Note: Sorry in advance that this patch is so big. Unfortunately
splitting it up would create lots of redundant changes.
This should be the last big refactoring for the Wayland compositor
backend for now.
Up until now SurfacePoolWayland was a pool of actual wl_surface
s,
as before bug 1718569 we had no direct access to wl_buffer
s when
using EGL. However, the way SurfacePoolCA
manages native surfaces
is closer to what in Wayland terminology would be a buffer pool:
buffers are heavy-weight and expansive to allocate, while
wl_surface
objects are cheap to recreate.
So instead of having a pool of surfaces, each of them having its
own pool of buffers, make wl_surface
s part of tiles and make
SurfacePoolWayland
manage wl_buffer
s (in the form of SHM- or
DMABuf buffers). This will not only allow us to share buffers more
efficiently but also simplify our tile management logic.
Most importantly, we'll need to reorder wl_surfaces less often and
less complex (no place_below the parent surface) and can also drop
reattaching subsurfaces to compositors. Especially the former will
likely decrease CPU time in compositors.
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Did some more intense testing and it looks very solid now, i.e. ready to go.
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/e38576ce6c5c Restructure surface pool into a buffer pool,r=stransky,gfx-reviewers,lsalzman
Comment 9•3 years ago
|
||
bugherder |
Description
•