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
This commit is contained in:
Alexander Orzechowski 2023-06-13 20:46:29 -04:00 committed by Simon Ser
parent 4391845910
commit 96b95bf775

View file

@ -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;
}