From 039a31df9a8708cdc0d054c105b4d078b3817dea Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 19 May 2022 14:16:52 -0400 Subject: wlr_scene: Allow buffer in wlr_scene_buffer to be NULL This is useful to emulate an unmapped surface. --- include/wlr/types/wlr_scene.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/wlr') 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); -- cgit v1.2.3