buffer: make wlr_client_buffer_apply_damage return a bool

We always return the same wlr_client_buffer as the one passed in,
so no need to return anything.
This commit is contained in:
Simon Ser 2021-08-11 17:22:11 +02:00
parent cbe099dcc7
commit bb82b6dada
3 changed files with 14 additions and 21 deletions

View file

@ -178,15 +178,12 @@ struct wlr_client_buffer *wlr_client_buffer_get(struct wlr_buffer *buffer);
*/
bool wlr_resource_is_buffer(struct wl_resource *resource);
/**
* Try to update the buffer's content. On success, returns the updated buffer
* and destroys the provided `buffer`. On error, `buffer` is intact and NULL is
* returned.
* Try to update the buffer's content.
*
* Fails if there's more than one reference to the buffer or if the texture
* isn't mutable.
*/
struct wlr_client_buffer *wlr_client_buffer_apply_damage(
struct wlr_client_buffer *buffer, struct wlr_buffer *next,
pixman_region32_t *damage);
bool wlr_client_buffer_apply_damage(struct wlr_client_buffer *client_buffer,
struct wlr_buffer *next, pixman_region32_t *damage);
#endif