From 583a86b537cd3b0d41c23949600c06515f5056bf Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 6 Jun 2009 11:28:02 -0400 Subject: [PATCH] Use double temporaries when computing group size If we use float temporaries when computing the bounds of a group, then, depending on what variables are kept in registers and what stored on the stack, the accumulated difference between natural_width and min_width can be more than FLOAT_EPSILON. Using double temporaries will eliminate the difference in most cases, or, very rarely, reduce it to a last-bit error. http://bugzilla.openedhand.com/show_bug.cgi?id=1632 Signed-off-by: Emmanuele Bassi --- clutter/clutter-group.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 0653e76f1..6efe93108 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -132,8 +132,8 @@ clutter_fixed_layout_get_preferred_width (GList *children, gfloat *natural_width_p) { GList *l; - gfloat min_left, min_right; - gfloat natural_left, natural_right; + gdouble min_left, min_right; + gdouble natural_left, natural_right; min_left = 0; min_right = 0; @@ -208,8 +208,8 @@ clutter_fixed_layout_get_preferred_height (GList *children, gfloat *natural_height_p) { GList *l; - gfloat min_top, min_bottom; - gfloat natural_top, natural_bottom; + gdouble min_top, min_bottom; + gdouble natural_top, natural_bottom; min_top = 0; min_bottom = 0;