aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_scene.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h
index 965782bf..7548bb3e 100644
--- a/include/wlr/types/wlr_scene.h
+++ b/include/wlr/types/wlr_scene.h
@@ -31,6 +31,7 @@ enum wlr_scene_node_type {
WLR_SCENE_NODE_TREE,
WLR_SCENE_NODE_SURFACE,
WLR_SCENE_NODE_RECT,
+ WLR_SCENE_NODE_BUFFER,
};
struct wlr_scene_node_state {
@@ -85,6 +86,16 @@ struct wlr_scene_rect {
float color[4];
};
+/** A scene-graph node displaying a buffer */
+struct wlr_scene_buffer {
+ struct wlr_scene_node node;
+ struct wlr_buffer *buffer;
+
+ // private state
+
+ struct wlr_texture *texture;
+};
+
/** A viewport for an output in the scene-graph */
struct wlr_scene_output {
struct wlr_output *output;
@@ -195,6 +206,12 @@ void wlr_scene_rect_set_size(struct wlr_scene_rect *rect, int width, int height)
void wlr_scene_rect_set_color(struct wlr_scene_rect *rect, const float color[static 4]);
/**
+ * Add a node displaying a buffer to the scene-graph.
+ */
+struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent,
+ struct wlr_buffer *buffer);
+
+/**
* Add a viewport for the specified output to the scene-graph.
*
* An output can only be added once to the scene-graph.