From 7b57449e1981dfe83b4953b7cbb37e22dd2273b4 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Thu, 19 Sep 2019 17:02:21 +0000 Subject: [PATCH] damage: Support y-inversion --- src/damage.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/damage.c b/src/damage.c index 82b2801..3d27db0 100644 --- a/src/damage.c +++ b/src/damage.c @@ -57,6 +57,8 @@ int check_damage_linear(struct pixman_region16 *damage, int width = fb0->width; int height = fb0->height; + bool y_invert = !!(fb0->nvnc_modifier & NVNC_MOD_Y_INVERT); + assert(x_hint + width_hint <= width); assert(y_hint + height_hint <= height); @@ -76,6 +78,9 @@ int check_damage_linear(struct pixman_region16 *damage, width, tile_width, tile_height)) continue; + if (y_invert) + y = height - y - tile_height; + pixman_region_union_rect(damage, damage, x, y, tile_width, tile_height); }