test-pixmap: Add a --disable-animation option

Sometimes the animation makes debugging awkward so this patch adds a
--disable-animation option to simplify the test.
This commit is contained in:
Neil Roberts 2010-05-28 17:53:04 +01:00
parent 75f48ad0ec
commit 02de8b9ad5

View File

@ -23,6 +23,7 @@
static gboolean disable_x11 = FALSE;
static gboolean disable_glx = FALSE;
static gboolean disable_animation = FALSE;
static GOptionEntry g_options[] =
{
@ -38,6 +39,12 @@ static GOptionEntry g_options[] =
&disable_glx,
"Disable redirection through GLX pixmap",
NULL },
{ "disable-animation",
0, 0,
G_OPTION_ARG_NONE,
&disable_animation,
"Disable the animations",
NULL },
{ NULL }
};
@ -256,6 +263,7 @@ test_pixmap_main (int argc, char **argv)
clutter_texture_set_filter_quality (CLUTTER_TEXTURE (tex),
CLUTTER_TEXTURE_QUALITY_HIGH);
clutter_actor_set_position (group, 0, 0);
if (!disable_animation)
clutter_behaviour_apply (depth_behavior, group);
}
@ -279,6 +287,7 @@ test_pixmap_main (int argc, char **argv)
clutter_actor_get_width (stage)
- clutter_actor_get_width (tex),
0);
if (!disable_animation)
clutter_behaviour_apply (depth_behavior, group);
if (!clutter_glx_texture_pixmap_using_extension (
@ -316,6 +325,7 @@ test_pixmap_main (int argc, char **argv)
/* oddly, the actor's size is 0 until it is realized, even though
pixmap-height is set */
clutter_actor_set_position (group, 0, row_height);
if (!disable_animation)
clutter_behaviour_apply (depth_behavior, group);
@ -326,6 +336,7 @@ test_pixmap_main (int argc, char **argv)
clutter_actor_show (stage);
if (!disable_animation)
clutter_timeline_start (timeline);
clutter_main ();