summaryrefslogtreecommitdiff
path: root/gsk/gsktransform.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-01-04 08:54:58 +0100
committerTimm Bäder <mail@baedert.org>2020-01-07 17:27:19 +0100
commit7669e6e42e91a9ba1fc61ff961ec597438ff8637 (patch)
tree54b282a27668a46e167ac6d8047fe7bb3cbcba9b /gsk/gsktransform.c
parenta3f14a3395caac6ebc5e265b8074a9b411bb890d (diff)
downloadgtk+-7669e6e42e91a9ba1fc61ff961ec597438ff8637.tar.gz
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.
Diffstat (limited to 'gsk/gsktransform.c')
-rw-r--r--gsk/gsktransform.c6
1 files changed, 3 insertions, 3 deletions
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