From: Timm Bäder Date: Tue, 31 Dec 2019 07:54:42 +0000 (+0100) Subject: snapshot: Only normalize rectangle if we have to X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~377 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=21a7dfae964ee5186b54e1445671b4d0559fc483;p=gtk4.git snapshot: Only normalize rectangle if we have to We can even replace the comment this way. --- diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index c87ba493f9..b1bee0fba9 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -587,8 +587,9 @@ gtk_graphene_rect_scale_affine (const graphene_rect_t *rect, res->origin.y = scale_y * rect->origin.y + dy; res->size.width = scale_x * rect->size.width; res->size.height = scale_y * rect->size.height; - /* necessary when scale_x or scale_y are < 0 */ - graphene_rect_normalize (res); + + if (scale_x < 0 || scale_y < 0) + graphene_rect_normalize (res); } static void