wlroots/include/wlr
Simon Ser 5f6b9e5620 Replace wlr_client_buffer with wlr_surface_texture
wlr_client_buffer has a bad design: just because it needs some
ref'counting functionality, it's implemented as a wlr_buffer.
Its purpose is to allow compositors to obtain a frozen wlr_texture
to keep painting an old representation of the surface for an
arbitrary amount of time (e.g. during layout reconfigurations).

However a wlr_buffer lock means something else entirely, and abusing
it for ref'counting a texture leads to various issues. In particular,
wlr_surface checks the wlr_client_buffer lock count to decide whether
to mutate a texture on commit. This falls apart if the buffer is
locked for another purpose than freezing a surface texture (e.g.
locked by another wlroots helper). Additionally, wlr_client_buffer
forces backends to re-import and re-check the buffer each time the
client commits, since DMA-BUF wlr_client_buffers are destroyed and
re-created on each commit. wlr_client_buffer also doesn't properly
forward all wlr_buffer operations to the source buffer: some are
unimplemented, and the source buffer is not locked by wlr_client_buffer
thus may be destroyed anytime.

To fix all of this mess, introduce a new struct wlr_surface_texture
whose purpose is just to track whether a wlr_texture is frozen.
Compositors can lock the texture to freeze it. The wlr_buffer can be
accessed from wlr_surface_texture.buffer, or at surface commit time
from wlr_surface.current.buffer.
2024-03-12 14:56:32 +01:00
..
backend backend/session: add docs 2024-02-01 16:08:47 +01:00
interfaces output: take wl_event_loop in wlr_output_init() 2023-11-23 11:39:25 +00:00
render render/texture: add destroy event 2024-03-12 14:53:06 +01:00
types Replace wlr_client_buffer with wlr_surface_texture 2024-03-12 14:56:32 +01:00
util region: add docs for wlr_region_scale_xy() and wlr_region_confine() 2024-01-03 21:19:41 +03:00
xwayland xwayland: add wlr_xwayland_get_xwm_connection 2024-03-09 11:21:17 +00:00
backend.h backend: take wl_event_loop instead of wl_display in wlr_backend_autocreate() 2024-01-25 15:05:36 +00:00
config.h.in backend/session: make optional 2022-11-25 16:15:29 +00:00
meson.build build: bump version to 0.16.0-dev 2022-05-24 15:04:14 +02:00
version.h.in Drop WLR_VERSION_API_* 2021-06-29 12:22:55 +02:00
xcursor.h examples, tinywl: use "default" cursor instead of "left_ptr" 2023-02-01 15:00:42 +01:00
xwayland.h xwayland: split headers 2022-11-02 19:00:23 +01:00