mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 16:40:41 -05:00
36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
|
diff --git a/tests/interactive/test-cogl-tex-tile.c b/tests/interactive/test-cogl-tex-tile.c
|
||
|
index fe7138a..5be6dd5 100644
|
||
|
--- a/tests/interactive/test-cogl-tex-tile.c
|
||
|
+++ b/tests/interactive/test-cogl-tex-tile.c
|
||
|
@@ -90,22 +90,22 @@ test_coglbox_paint(ClutterActor *self)
|
||
|
ClutterFixed sin_frame, cos_frame;
|
||
|
ClutterFixed frac_frame;
|
||
|
gint t;
|
||
|
- sin_frame = clutter_sini (CLUTTER_ANGLE_FROM_DEG (priv->frame));
|
||
|
- cos_frame = clutter_cosi (CLUTTER_ANGLE_FROM_DEG (priv->frame));
|
||
|
+ sin_frame = clutter_sinx (CLUTTER_INT_TO_FIXED (priv->frame));
|
||
|
+ cos_frame = clutter_cosx (CLUTTER_INT_TO_FIXED (priv->frame));
|
||
|
|
||
|
pingpong_frame = (priv->frame <= 180 ? priv->frame : 360 - priv->frame);
|
||
|
- frac_frame = COGL_FIXED_DIV (CLUTTER_INT_TO_FIXED (pingpong_frame),
|
||
|
- CLUTTER_INT_TO_FIXED (180));
|
||
|
- frac_frame += (COGL_FIXED_1 >> 1);
|
||
|
- frac_frame <<= 1;
|
||
|
+ frac_frame = CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (pingpong_frame),
|
||
|
+ CLUTTER_INT_TO_FIXED (180));
|
||
|
+ frac_frame += 0.5;
|
||
|
+ frac_frame *= 2;
|
||
|
|
||
|
for (t=0; t<4; t+=2)
|
||
|
{
|
||
|
texcoords[t] += cos_frame;
|
||
|
texcoords[t+1] += sin_frame;
|
||
|
|
||
|
- texcoords[t] = COGL_FIXED_MUL (texcoords[t], frac_frame);
|
||
|
- texcoords[t+1] = COGL_FIXED_MUL (texcoords[t+1], frac_frame);
|
||
|
+ texcoords[t] = CLUTTER_FIXED_MUL (texcoords[t], frac_frame);
|
||
|
+ texcoords[t+1] = CLUTTER_FIXED_MUL (texcoords[t+1], frac_frame);
|
||
|
}
|
||
|
|
||
|
priv = TEST_COGLBOX_GET_PRIVATE (self);
|