wlroots/include/types
Simon Ser 8afb4d8bf0 buffer: re-use wlr_shm_client_buffer
The first time wlr_buffer_from_resource is called with a wl_buffer
resource that originates from wl_shm, create a new
wlr_shm_client_buffer as usual. If wlr_buffer_from_resource is called
multiple times, re-use the existing wlr_shm_client_buffer.

This commit changes how the wlr_shm_client_buffer lifetime is managed:
previously it was destroyed as soon as the wlr_buffer was released.
With this commit it's destroyed when the wl_buffer resource is.

Apart from de-duplicating wlr_shm_client_buffer creations, this allows
to easily track when a wlr_shm_client_buffer is re-used. This is useful
for the renderer and the backends, e.g. the Pixman renderer can keep
using the same Pixman image if the buffer is re-used. In the future,
this will also allow to re-use resources in the Wayland and X11 backends
(remote wl_buffer objects for Wayland, pixmaps for X11).
2021-07-19 13:13:10 -04:00
..
wlr_buffer.h buffer: re-use wlr_shm_client_buffer 2021-07-19 13:13:10 -04:00
wlr_data_device.h Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_keyboard.h Use absolute paths in include in header files 2021-04-06 10:40:56 +02:00
wlr_region.h region: remove leftover description of resource_list 2021-02-06 00:05:36 +01:00
wlr_seat.h Send pointer enter/leave on capability change 2020-03-14 00:09:32 +01:00
wlr_surface.h surface: make wlr_subsurface_create private 2021-06-29 10:32:17 -04:00
wlr_tablet_v2.h Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_xdg_shell.h Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00