diff options
-rw-r--r-- | types/scene/wlr_scene.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 498fa878..94d0c02c 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -577,6 +577,14 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff pixman_region32_init(&output_damage); wlr_region_scale_xy(&output_damage, &trans_damage, output_scale * scale_x, output_scale * scale_y); + + pixman_region32_t cull_region; + pixman_region32_init(&cull_region); + wlr_region_scale(&cull_region, &scene_buffer->node.visible, output_scale); + pixman_region32_translate(&cull_region, -lx * output_scale, -ly * output_scale); + pixman_region32_intersect(&output_damage, &output_damage, &cull_region); + pixman_region32_fini(&cull_region); + pixman_region32_translate(&output_damage, (lx - scene_output->x) * output_scale, (ly - scene_output->y) * output_scale); |