diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-13 20:46:29 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-15 14:57:51 +0000 |
commit | 96b95bf775c886c083d76fb25f897fee7c907c3d (patch) | |
tree | d3977d1e86c2430ba59925985473430eb2eaac9a | |
parent | 43918459109f2a6e23b13bcb77487cd9b37df81f (diff) | |
download | wlroots-96b95bf775c886c083d76fb25f897fee7c907c3d.tar.xz |
wlr_scene: Reset damage ring bounds every frame
This fixes damage issues when a output state attempts to change
the transformed size in some way
-rw-r--r-- | types/scene/wlr_scene.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 447c96ab..f3a0db34 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1215,9 +1215,6 @@ static void scene_node_output_update(struct wlr_scene_node *node, } static void scene_output_update_geometry(struct wlr_scene_output *scene_output) { - int width, height; - wlr_output_transformed_resolution(scene_output->output, &width, &height); - wlr_damage_ring_set_bounds(&scene_output->damage_ring, width, height); wlr_damage_ring_add_whole(&scene_output->damage_ring); wlr_output_schedule_frame(scene_output->output); @@ -1703,6 +1700,9 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output, pixman_region32_fini(&acc_damage); } + wlr_damage_ring_set_bounds(&scene_output->damage_ring, + render_data.trans_width, render_data.trans_height); + if (!wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) { return false; } |