buffer: add wlr_client_buffer.source

This stores a weak reference to the source buffer.
This commit is contained in:
Simon Ser 2021-07-09 17:06:28 +02:00 committed by Simon Zeni
parent 0abb67c478
commit a0baba4fa0
2 changed files with 19 additions and 0 deletions

View file

@ -136,10 +136,15 @@ struct wlr_client_buffer {
* client destroys the buffer before it has been released.
*/
struct wlr_texture *texture;
/**
* The buffer this client buffer was created from. NULL if destroyed.
*/
struct wlr_buffer *source;
// private state
struct wl_listener resource_destroy;
struct wl_listener source_destroy;
// If the client buffer has been created from a wl_shm buffer
uint32_t shm_source_format;