diff options
author | Alexander Orzechowski <[email protected]> | 2022-06-25 17:58:13 -0400 |
---|---|---|
committer | Alexander Orzechowski <[email protected]> | 2022-08-14 01:39:20 -0400 |
commit | 670e92397494f6ff8d4b5266c7615909dd127329 (patch) | |
tree | cc0b93ed13e00deb81a40f1aba0a1bd3be4ad031 | |
parent | 347401dcfcf27a957420f304a2693de1e8d7fb1d (diff) |
wlr_scene: Add per scene node visibility
-rw-r--r-- | wlr_scene.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wlr_scene.c b/wlr_scene.c index 4f62a88..f4815ec 100644 --- a/wlr_scene.c +++ b/wlr_scene.c @@ -58,6 +58,7 @@ static void scene_node_init(struct wlr_scene_node *node, wl_list_init(&node->link); wl_signal_init(&node->events.destroy); + pixman_region32_init(&node->visible); if (parent != NULL) { wl_list_insert(parent->children.prev, &node->link); @@ -127,6 +128,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) { wlr_addon_set_finish(&node->addons); wl_list_remove(&node->link); + pixman_region32_fini(&node->visible); free(node); } @@ -610,6 +612,9 @@ static void _scene_node_damage_whole(struct wlr_scene_node *node, int width, height; scene_node_get_size(node, &width, &height); + pixman_region32_fini(&node->visible); + pixman_region32_init_rect(&node->visible, lx, ly, width, height); + struct wlr_scene_output *scene_output; wl_list_for_each(scene_output, &scene->outputs, link) { struct wlr_box box = { |