From 9eb71146ae56c509ee33c7e8a662549592aad870 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 30 May 2022 19:26:08 -0400 Subject: wlr_scene: Refactor wlr_scene (the root element) to encase a wlr_scene_tree Co-authored-by: Isaac Freund --- include/wlr/types/wlr_scene.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 0e3857d5..9af0f25c 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -41,7 +41,6 @@ typedef void (*wlr_scene_buffer_iterator_func_t)( struct wlr_scene_buffer *buffer, int sx, int sy, void *user_data); enum wlr_scene_node_type { - WLR_SCENE_NODE_ROOT, WLR_SCENE_NODE_TREE, WLR_SCENE_NODE_RECT, WLR_SCENE_NODE_BUFFER, @@ -77,9 +76,14 @@ enum wlr_scene_debug_damage_option { WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT }; +/** A sub-tree in the scene-graph. */ +struct wlr_scene_tree { + struct wlr_scene_node node; +}; + /** The root scene-graph node. */ struct wlr_scene { - struct wlr_scene_node node; + struct wlr_scene_tree tree; struct wl_list outputs; // wlr_scene_output.link @@ -94,11 +98,6 @@ struct wlr_scene { struct wl_list damage_highlight_regions; }; -/** A sub-tree in the scene-graph. */ -struct wlr_scene_tree { - struct wlr_scene_node node; -}; - /** A scene-graph node displaying a single surface. */ struct wlr_scene_surface { struct wlr_scene_buffer *buffer; -- cgit v1.2.3