diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_scene.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 7548bb3e..93be43d0 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -94,6 +94,7 @@ struct wlr_scene_buffer { // private state struct wlr_texture *texture; + struct wlr_fbox src_box; }; /** A viewport for an output in the scene-graph */ @@ -212,6 +213,15 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent, struct wlr_buffer *buffer); /** + * Set the source rectangle describing the region of the buffer which will be + * sampled to render this node. This allows cropping the buffer. + * + * If NULL, the whole buffer is sampled. By default, the source box is NULL. + */ +void wlr_scene_buffer_set_source_box(struct wlr_scene_buffer *scene_buffer, + const struct wlr_fbox *box); + +/** * Add a viewport for the specified output to the scene-graph. * * An output can only be added once to the scene-graph. |