mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
scene: apply rounding when translating buffer damage
Without a round in this case the damage region is translated to truncated coordinates, potentially misplacing it relative to the actual position of that region in the output buffer.
This commit is contained in:
parent
4de9c9c47f
commit
b18c76642a
1 changed files with 2 additions and 2 deletions
|
@ -738,8 +738,8 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff
|
||||||
pixman_region32_fini(&cull_region);
|
pixman_region32_fini(&cull_region);
|
||||||
|
|
||||||
pixman_region32_translate(&output_damage,
|
pixman_region32_translate(&output_damage,
|
||||||
(lx - scene_output->x) * output_scale,
|
(int)round((lx - scene_output->x) * output_scale),
|
||||||
(ly - scene_output->y) * output_scale);
|
(int)round((ly - scene_output->y) * output_scale));
|
||||||
if (wlr_damage_ring_add(&scene_output->damage_ring, &output_damage)) {
|
if (wlr_damage_ring_add(&scene_output->damage_ring, &output_damage)) {
|
||||||
wlr_output_schedule_frame(scene_output->output);
|
wlr_output_schedule_frame(scene_output->output);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue