From 73a656e8ac1523a09323101f95700e8ec388bee6 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Wed, 18 May 2022 22:37:05 -0400 Subject: wlr_scene: Add a function to also specify damage when applying a buffer to wlr_scene_buffer --- include/wlr/types/wlr_scene.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 4c1f5ea9..033d4cc6 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -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. -- cgit v1.2.3