wlr_scene: Introduce addons to scene nodes

This commit is contained in:
Alexander Orzechowski 2022-05-19 14:25:34 -04:00
parent f2dbcc3358
commit 5f43e1732a
2 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,8 @@ struct wlr_scene_node {
} events;
void *data;
struct wlr_addon_set addons;
};
/** The root scene-graph node. */

View File

@ -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);
}