Restructure surface pool into a buffer pool
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox92 | --- | fixed |
People
(Reporter: rmader, Assigned: rmader)
References
Details
Attachments
(1 file)
Up until now SurfacePoolWayland was a pool of actual wl_surfaces, as before bug 1718569 we had no direct access to wl_buffers 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_surfaces part of tiles and make SurfacePoolWayland manage wl_buffers (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.
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 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_surfaces,
as before bug 1718569 we had no direct access to wl_buffers 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_surfaces part of tiles and make
SurfacePoolWayland manage wl_buffers (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•4 years ago
|
||
| Assignee | ||
Comment 3•4 years ago
|
||
| Assignee | ||
Comment 4•4 years ago
|
||
| Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 6•4 years ago
|
||
| Assignee | ||
Comment 7•4 years ago
|
||
Did some more intense testing and it looks very solid now, i.e. ready to go.
Comment 9•4 years ago
|
||
| bugherder | ||
Description
•