2008-11-06 Emmanuele Bassi <ebassi@linux.intel.com>

Bug 1233 - CLUTTER_ALPHA_SINE_INC is broken in trunk

	* clutter/clutter-alpha.c: Fix a rollover in the sine functions.
This commit is contained in:
Emmanuele Bassi 2008-11-06 10:54:31 +00:00
parent e6570be339
commit ae6d930bba
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-11-06 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1233 - CLUTTER_ALPHA_SINE_INC is broken in trunk
* clutter/clutter-alpha.c: Fix a rollover in the sine functions.
2008-11-05 Neil Roberts <neil@linux.intel.com>
* clutter/clutter-color.c (clutter_color_new): Remove CLAMP macros

View File

@ -585,7 +585,9 @@ sincx1024_func (ClutterAlpha *alpha,
sine = ((cogl_angle_sin (x) + offset) / 2)
* CLUTTER_ALPHA_MAX_ALPHA;
return COGL_FIXED_TO_INT (sine);
sine = sine >> COGL_FIXED_Q;
return sine;
}
#if 0
@ -717,7 +719,7 @@ clutter_sine_inc_func (ClutterAlpha *alpha,
sine = cogl_angle_sin (x) * CLUTTER_ALPHA_MAX_ALPHA;
return COGL_FIXED_TO_INT (sine);
return ((guint32) sine) >> COGL_FIXED_Q;
}
/**
@ -759,7 +761,7 @@ clutter_sine_dec_func (ClutterAlpha *alpha,
sine = cogl_angle_sin (x) * CLUTTER_ALPHA_MAX_ALPHA;
return COGL_FIXED_TO_INT (sine);
return ((guint32) sine) >> COGL_FIXED_Q;
}
/**