From 6414adbfeb696282c5e5ca0eb47a77caf3309d92 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 11 Jun 2009 16:59:50 +0100 Subject: [PATCH] [tests] Fix the cogl_polygon() interactive test We need to premultiply the alpha, and we also need to change the frame painting to use the frame-less Timeline. --- tests/interactive/test-cogl-tex-polygon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/interactive/test-cogl-tex-polygon.c b/tests/interactive/test-cogl-tex-polygon.c index 851e27169..1a86f8df6 100644 --- a/tests/interactive/test-cogl-tex-polygon.c +++ b/tests/interactive/test-cogl-tex-polygon.c @@ -120,6 +120,7 @@ test_coglbox_fade_texture (CoglHandle tex_id, 255, 255, ((i ^ (i >> 1)) & 1) ? 0 : 128); + cogl_color_premultiply (&(vertices[i].color)); } cogl_set_source_texture (tex_id); @@ -307,12 +308,13 @@ test_coglbox_new (void) static void frame_cb (ClutterTimeline *timeline, - gint frame_num, + gint elapsed_msecs, gpointer data) { TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (data); + gdouble progress = clutter_timeline_get_progress (timeline); - priv->frame = frame_num; + priv->frame = 360.0 * progress; clutter_actor_queue_redraw (CLUTTER_ACTOR (data)); }