aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-09-20 18:05:11 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-09-22 10:45:39 -0600
commit43833fba642bd7c63c6010965f1009a72dbe3e74 (patch)
tree4bafe00b2d6601e7c6bf9fe4d7882c81cba4c8da /include/wlr
parent3d4afbe9455a049b01a981ca10868cc6411827cc (diff)
scene: add wlr_scene_buffer_set_dest_size
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_scene.h11
1 files changed, 11 insertions, 0 deletions
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 */
@@ -222,6 +223,16 @@ 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.
*
* An output can only be added once to the scene-graph.