From 43833fba642bd7c63c6010965f1009a72dbe3e74 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 20 Sep 2021 18:05:11 +0200 Subject: scene: add wlr_scene_buffer_set_dest_size --- include/wlr/types/wlr_scene.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 93be43d0..6c5194f8 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -95,6 +95,7 @@ struct wlr_scene_buffer { struct wlr_texture *texture; struct wlr_fbox src_box; + int dst_width, dst_height; }; /** A viewport for an output in the scene-graph */ @@ -221,6 +222,16 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent, void wlr_scene_buffer_set_source_box(struct wlr_scene_buffer *scene_buffer, const struct wlr_fbox *box); +/** + * Set the destination size describing the region of the scene-graph the buffer + * will be painted onto. This allows scaling the buffer. + * + * If zero, the destination size will be the buffer size. By default, the + * destination size is zero. + */ +void wlr_scene_buffer_set_dest_size(struct wlr_scene_buffer *scene_buffer, + int width, int height); + /** * Add a viewport for the specified output to the scene-graph. * -- cgit v1.2.3