mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
wlr_scene: Don't damage when setting opaque region
Opaque region is a optimization hint, (bugs outstanding) it will not change the output contents, therefore damage does not need to be submitted. However, we still need to update the visibility state of the other nodes in the tree. To do this call scene_update_region() by ourselves but not `scene_node_update()` which will damage the outputs.
This commit is contained in:
parent
a32180afa7
commit
fd540f6d07
1 changed files with 11 additions and 1 deletions
|
@ -764,7 +764,17 @@ void wlr_scene_buffer_set_opaque_region(struct wlr_scene_buffer *scene_buffer,
|
|||
}
|
||||
|
||||
pixman_region32_copy(&scene_buffer->opaque_region, region);
|
||||
scene_node_update(&scene_buffer->node, NULL);
|
||||
|
||||
int x, y;
|
||||
if (!wlr_scene_node_coords(&scene_buffer->node, &x, &y)) {
|
||||
return;
|
||||
}
|
||||
|
||||
pixman_region32_t update_region;
|
||||
pixman_region32_init(&update_region);
|
||||
scene_node_bounds(&scene_buffer->node, x, y, &update_region);
|
||||
scene_update_region(scene_node_get_root(&scene_buffer->node), &update_region);
|
||||
pixman_region32_fini(&update_region);
|
||||
}
|
||||
|
||||
void wlr_scene_buffer_set_source_box(struct wlr_scene_buffer *scene_buffer,
|
||||
|
|
Loading…
Reference in a new issue