wlr_scene: Add a function to also specify damage when applying a buffer to wlr_scene_buffer

This commit is contained in:
Alexander Orzechowski 2022-05-18 22:37:05 -04:00
parent 34be5da072
commit 73a656e8ac
2 changed files with 91 additions and 15 deletions

View file

@ -303,6 +303,15 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent,
void wlr_scene_buffer_set_buffer(struct wlr_scene_buffer *scene_buffer,
struct wlr_buffer *buffer);
/**
* Sets the buffer's backing buffer with a custom damage region.
*
* The damage region is in buffer-local coordinates. If the region is NULL,
* the whole buffer node will be damaged.
*/
void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buffer,
struct wlr_buffer *buffer, pixman_region32_t *region);
/**
* Set the source rectangle describing the region of the buffer which will be
* sampled to render this node. This allows cropping the buffer.