mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
Bug 1195 - ClutterBehaviourBspline only works for very short paths
* clutter/clutter-behaviour-bspline.c: Changed the CBZ_T_POW3 and CBZ_T_MUL functions so that they preserve more of the least significant bits. This fixes some of the jaggy behaviour with longer paths.
This commit is contained in:
parent
8f1819cd52
commit
49192f60b6
@ -1,3 +1,12 @@
|
|||||||
|
2008-10-20 Neil Roberts <neil@linux.intel.com>
|
||||||
|
|
||||||
|
Bug 1195 - ClutterBehaviourBspline only works for very short paths
|
||||||
|
|
||||||
|
* clutter/clutter-behaviour-bspline.c: Changed the CBZ_T_POW3 and
|
||||||
|
CBZ_T_MUL functions so that they preserve more of the least
|
||||||
|
significant bits. This fixes some of the jaggy behaviour with
|
||||||
|
longer paths.
|
||||||
|
|
||||||
2008-10-17 Thomas Wood <thomas@linux.intel.com>
|
2008-10-17 Thomas Wood <thomas@linux.intel.com>
|
||||||
|
|
||||||
reviewed by: Emmanuele Bassi <ebassi@linux.intel.com>
|
reviewed by: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||||
|
@ -68,14 +68,16 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The t parameter of the bezier is from interval <0,1>, so we use
|
* The t parameter of the bezier is from interval <0,1>, so we can use
|
||||||
* 14.18 fixed format to improve precission and simplify POW3 calculation.
|
* 14.18 format and special multiplication functions that preserve
|
||||||
|
* more of the least significant bits but would overflow if the value
|
||||||
|
* is > 1
|
||||||
*/
|
*/
|
||||||
#define CBZ_T_Q 18
|
#define CBZ_T_Q 18
|
||||||
#define CBZ_T_ONE (1 << CBZ_T_Q)
|
#define CBZ_T_ONE (1 << CBZ_T_Q)
|
||||||
#define CBZ_T_POW2(x) ((x >> 9) * (x >> 9))
|
#define CBZ_T_MUL(x,y) ((((x) >> 3) * ((y) >> 3)) >> 12)
|
||||||
#define CBZ_T_POW3(x) ((x >> 12) * (x >> 12) * (x >> 12))
|
#define CBZ_T_POW2(x) CBZ_T_MUL (x, x)
|
||||||
#define CBZ_T_MUL(x,y) ((x >> 9) * (y >> 9))
|
#define CBZ_T_POW3(x) CBZ_T_MUL (CBZ_T_POW2 (x), x)
|
||||||
#define CBZ_T_DIV(x,y) ((((x) << 9)/(y)) << 9)
|
#define CBZ_T_DIV(x,y) ((((x) << 9)/(y)) << 9)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user