From e60584ea6f7db76974b18789c9b90aaeeedf072a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 10 Jun 2009 18:10:32 +0100 Subject: [PATCH] Change the paint forcing on the Text cache text The changes in the master clock and the repaint cycle have been changed, and broke the way the test for the Text actor cache of PangoLayouts forces a redraw. We have to call clutter_actor_paint() on the Stage embedding the Text actor we want to test; this is kinda fugly because if the Layout has changed it will end up causing a reallocation cycle in the middle of the Text actor paint. Since it's a test case, and since forcing redraws is a bit of a hack as well, we can close both our eyes on that. --- tests/conform/test-text-cache.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/conform/test-text-cache.c b/tests/conform/test-text-cache.c index ac650528d..a5425e77e 100644 --- a/tests/conform/test-text-cache.c +++ b/tests/conform/test-text-cache.c @@ -49,7 +49,14 @@ on_paint (ClutterActor *label, CallbackData *data) static void force_redraw (CallbackData *data) { - clutter_redraw (CLUTTER_STAGE (clutter_actor_get_stage (data->label))); + /* XXX - this is fugly; we force a paint on the stage, which + * will then paint the Text actor. inside the Text actor we + * check for a Layout with the allocation size. if the allocation + * has changed it will cause a relayout in the middle of the + * paint, which is expensive and broken. this will ensure that + * the test passes, though + */ + clutter_actor_paint (clutter_actor_get_stage (data->label)); } static gboolean