summaryrefslogtreecommitdiff
path: root/wlr_scene.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <[email protected]>2022-08-16 07:03:22 -0400
committerAlexander Orzechowski <[email protected]>2022-08-19 16:18:11 -0400
commit4fd0b08bf3c3f2da2a1c89dd54f25553a43ea3a6 (patch)
tree4ef64b46b19cfd4bc478d44816db1f8eb013f227 /wlr_scene.c
parentd15c279302d5093c4841bfecfa7aabfa7da665d8 (diff)
wlr_scene: Simplify calculate_visibilty option
Diffstat (limited to 'wlr_scene.c')
-rw-r--r--wlr_scene.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/wlr_scene.c b/wlr_scene.c
index 79701ab..ddd09a3 100644
--- a/wlr_scene.c
+++ b/wlr_scene.c
@@ -398,15 +398,13 @@ static bool scene_node_update_iterator(struct wlr_scene_node *node,
struct wlr_box box = { .x = lx, .y = ly };
scene_node_get_size(node, &box.width, &box.height);
+ pixman_region32_subtract(&node->visible, &node->visible, data->update_region);
+ pixman_region32_union(&node->visible, &node->visible, data->visible);
+ pixman_region32_intersect_rect(&node->visible, &node->visible,
+ lx, ly, box.width, box.height);
+
if (data->calculate_visibility) {
- pixman_region32_subtract(&node->visible, &node->visible, data->update_region);
- pixman_region32_union(&node->visible, &node->visible, data->visible);
- pixman_region32_intersect_rect(&node->visible, &node->visible,
- lx, ly, box.width, box.height);
scene_node_cull_hidden(node, lx, ly, data->visible);
- } else {
- pixman_region32_fini(&node->visible);
- pixman_region32_init_rect(&node->visible, lx, ly, box.width, box.height);
}
update_node_update_outputs(node, data->outputs, NULL);