wlr_scene: Introduce addons to scene nodes

Alexander Orzechowski 3 years ago
parent f2dbcc3358
commit 5f43e1732a

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

@ -67,6 +67,8 @@ static void scene_node_init(struct wlr_scene_node *node,
if (parent != NULL) { if (parent != NULL) {
wl_list_insert(parent->state.children.prev, &node->state.link); 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); 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_scene_node_destroy(child);
} }
wlr_addon_set_finish(&node->addons);
scene_node_state_finish(&node->state); scene_node_state_finish(&node->state);
free(node); free(node);
} }

Loading…
Cancel
Save