[gtk/wip/baedert/gl-rework] transform: Don't use G_APPROX_VALUE for scale transforms



commit 5660d65e0616e3316ff346ac5afb591ddd4fb2a7
Author: Timm Bäder <mail baedert org>
Date:   Fri Jan 3 16:50:17 2020 +0100

    transform: Don't use G_APPROX_VALUE for scale transforms
    
    scale(2) and scale(1.99326) is not the same but causes rendering errors
    when we act like they are the same.

 gsk/gsktransform.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 9db4e4b4e2..ff91d6fe66 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 first->factor_x == second->factor_x &&
+         first->factor_y == second->factor_y &&
+         first->factor_z == second->factor_z;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]