From 5903fcc36db8ea3115471aaf04322a7cae7cdfc2 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 Nov 2011 13:52:03 +0000 Subject: [PATCH] performance/*: Do not use clutter_stage_get_default() --- tests/performance/test-picking.c | 9 +++++---- tests/performance/test-state-hidden.c | 7 ++++--- tests/performance/test-state-interactive.c | 6 +++--- tests/performance/test-state-mini.c | 7 ++++--- tests/performance/test-state-pick.c | 7 ++++--- tests/performance/test-state.c | 7 ++++--- tests/performance/test-text-perf.c | 4 +++- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/tests/performance/test-picking.c b/tests/performance/test-picking.c index 9362d35eb..3432166ca 100644 --- a/tests/performance/test-picking.c +++ b/tests/performance/test-picking.c @@ -67,7 +67,6 @@ main (int argc, char **argv) { glong i; gdouble angle; - const ClutterColor black = { 0x00, 0x00, 0x00, 0xff }; ClutterColor color = { 0x00, 0x00, 0x00, 0xff }; ClutterActor *stage, *rect; @@ -84,9 +83,11 @@ main (int argc, char **argv) return -1; } - stage = clutter_stage_get_default (); + stage = clutter_stage_new (); clutter_actor_set_size (stage, 512, 512); - clutter_stage_set_color (CLUTTER_STAGE (stage), &black); + clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black); + clutter_stage_set_title (CLUTTER_STAGE (stage), "Picking Performance"); + g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); printf ("Picking performance test with " "%d actors and %d events per frame\n", @@ -123,7 +124,7 @@ main (int argc, char **argv) clutter_actor_show (stage); clutter_perf_fps_start (CLUTTER_STAGE (stage)); - g_idle_add (queue_redraw, (gpointer)stage); + clutter_threads_add_idle (queue_redraw, stage); clutter_main (); clutter_perf_fps_report ("test-picking"); diff --git a/tests/performance/test-state-hidden.c b/tests/performance/test-state-hidden.c index 699beffc6..64911b4eb 100644 --- a/tests/performance/test-state-hidden.c +++ b/tests/performance/test-state-hidden.c @@ -53,7 +53,6 @@ gint main (gint argc, gchar **argv) { - ClutterColor black={0,0,0,0xff}; ClutterActor *stage; ClutterActor *group; ClutterState *layout_state; @@ -63,11 +62,13 @@ main (gint argc, if (CLUTTER_INIT_SUCCESS != clutter_init (&argc, &argv)) g_error ("Failed to initialize Clutter"); - stage = clutter_stage_get_default (); + stage = clutter_stage_new (); group = clutter_group_new (); layout_state = clutter_state_new (); - clutter_stage_set_color (CLUTTER_STAGE (stage), &black); + clutter_stage_set_title (CLUTTER_STAGE (stage), "State Performance [hidden]"); + clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Black); clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT); + g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); for (i=0; i