From: Timm Bäder Date: Sat, 4 Jan 2020 07:54:58 +0000 (+0100) Subject: transform: Properly compare scale transforms X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~368 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7669e6e42e91a9ba1fc61ff961ec597438ff8637;p=gtk4.git transform: Properly compare scale transforms If the epsilon we use there is too much, we can run into rendering errors because the GPU will use the actual scale value. --- diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c index 9db4e4b4e2..3f944db9ea 100644 --- a/gsk/gsktransform.c +++ b/gsk/gsktransform.c @@ -1077,9 +1077,9 @@ gsk_scale_transform_equal (GskTransform *first_transform, GskScaleTransform *first = (GskScaleTransform *) first_transform; GskScaleTransform *second = (GskScaleTransform *) second_transform; - return G_APPROX_VALUE (first->factor_x, second->factor_x, 0.01f) && - G_APPROX_VALUE (first->factor_y, second->factor_y, 0.01f) && - G_APPROX_VALUE (first->factor_z, second->factor_z, 0.01f); + return G_APPROX_VALUE (first->factor_x, second->factor_x, FLT_EPSILON) && + G_APPROX_VALUE (first->factor_y, second->factor_y, FLT_EPSILON) && + G_APPROX_VALUE (first->factor_z, second->factor_z, FLT_EPSILON); } static void