aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-05-19 14:16:52 -0400
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-05-19 14:16:52 -0400
commit039a31df9a8708cdc0d054c105b4d078b3817dea (patch)
tree599de2e36419285351cac18a09c607422ae35e0e /include/wlr
parent8fe3aa29da56be16faa73aca947647bd60cd4a94 (diff)
wlr_scene: Allow buffer in wlr_scene_buffer to be NULL
This is useful to emulate an unmapped surface.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_scene.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h
index 7c2238fb..6cc842b4 100644
--- a/include/wlr/types/wlr_scene.h
+++ b/include/wlr/types/wlr_scene.h
@@ -107,6 +107,8 @@ struct wlr_scene_rect {
/** A scene-graph node displaying a buffer */
struct wlr_scene_buffer {
struct wlr_scene_node node;
+
+ // May be NULL
struct wlr_buffer *buffer;
// private state
@@ -267,6 +269,8 @@ void wlr_scene_rect_set_color(struct wlr_scene_rect *rect, const float color[sta
/**
* Add a node displaying a buffer to the scene-graph.
+ *
+ * If the buffer is NULL, this node will not be displayed.
*/
struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_node *parent,
struct wlr_buffer *buffer);