From 5f43e1732a5933513790ebe306607a89bc9c0ad9 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 19 May 2022 14:25:34 -0400 Subject: wlr_scene: Introduce addons to scene nodes --- include/wlr/types/wlr_scene.h | 2 ++ types/scene/wlr_scene.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index f390c278..02088150 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -68,6 +68,8 @@ struct wlr_scene_node { } events; void *data; + + struct wlr_addon_set addons; }; /** The root scene-graph node. */ diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 89d48c11..f4fab207 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -67,6 +67,8 @@ static void scene_node_init(struct wlr_scene_node *node, if (parent != NULL) { wl_list_insert(parent->state.children.prev, &node->state.link); } + + wlr_addon_set_init(&node->addons); } static void scene_node_damage_whole(struct wlr_scene_node *node); @@ -133,6 +135,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) { wlr_scene_node_destroy(child); } + wlr_addon_set_finish(&node->addons); scene_node_state_finish(&node->state); free(node); } -- cgit v1.2.3