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 <ebassi@linux.intel.com>
This commit is contained in:
Owen W. Taylor 2009-06-06 11:28:02 -04:00 committed by Emmanuele Bassi
parent 009eafb9ee
commit 583a86b537

View File

@ -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;