From 36f1a38c3b382643405aa7511e8dd063f4c5ef03 Mon Sep 17 00:00:00 2001 From: Joan Torres Date: Fri, 27 Sep 2024 10:03:50 +0200 Subject: [PATCH] clutter/color-state: Compare chromaticity with 0.0001f epsilon This follows the precision used by the color management protocol on primaries. Part-of: --- clutter/clutter/clutter-color-state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clutter/clutter/clutter-color-state.c b/clutter/clutter/clutter-color-state.c index 06716bade..9813cfd56 100644 --- a/clutter/clutter/clutter-color-state.c +++ b/clutter/clutter/clutter-color-state.c @@ -654,8 +654,9 @@ chromaticity_equal (float x1, float y2) { - return G_APPROX_VALUE (x1, x2, 0.000001f) && - G_APPROX_VALUE (y1, y2, 0.000001f); + /* FIXME: the next color managment version will use more precision */ + return G_APPROX_VALUE (x1, x2, 0.0001f) && + G_APPROX_VALUE (y1, y2, 0.0001f); } static gboolean