magnifier: scale/transform the magnifier

Before this commit, the magnifier wasn't scaled, and caused visual
artifacts when the output is transformed.
This commit is contained in:
tokyo4j 2025-03-15 12:35:07 +09:00 committed by Johan Malm
parent 9f53d7ed25
commit 6dc8e279ec
2 changed files with 47 additions and 16 deletions

View file

@ -143,6 +143,13 @@ lab_wlr_scene_output_commit(struct wlr_scene_output *scene_output,
pixman_region32_init_rect(&region,
additional_damage.x, additional_damage.y,
additional_damage.width, additional_damage.height);
/*
* Region passed to scene_output_damage() should have the same
* scale as the output buffer but have a different transform.
*/
wlr_region_transform(&region, &region, wlr_output->transform,
wlr_output->width, wlr_output->height);
scene_output_damage(scene_output, &region);
pixman_region32_fini(&region);
}