aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-13 20:46:29 -0400
committerSimon Ser <contact@emersion.fr>2023-06-15 14:57:51 +0000
commit96b95bf775c886c083d76fb25f897fee7c907c3d (patch)
treed3977d1e86c2430ba59925985473430eb2eaac9a
parent43918459109f2a6e23b13bcb77487cd9b37df81f (diff)
downloadwlroots-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.c6
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;
}