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