From 267e458a433b819f98ca47557c0a899d8c4dd357 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 7 Sep 2010 20:29:01 +0100 Subject: [PATCH] actor: separate the queue redraw code clutter_actor_queue_relayout currently queues a relayout and a redraw, but the plan is to change it to only queue a relayout and honour the documentation by assuming that the process of relayouting will result queuing redraws for any actors whos allocation changes. This doesn't make that change it just adds an internal _clutter_actor_queue_only_relayout function which clutter_actor_queue_relayout now uses as well as calling clutter_actor_queue_redraw. --- clutter/clutter-actor.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 565392637..fcd3af045 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -642,6 +642,8 @@ static void clutter_anchor_coord_set_gravity (AnchorCoord *coord, static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord); +static void _clutter_actor_queue_only_relayout (ClutterActor *self); + static void _clutter_actor_get_relative_modelview (ClutterActor *self, ClutterActor *ancestor, CoglMatrix *matrix); @@ -5031,20 +5033,8 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self, clutter_paint_volume_free (pv); } -/** - * clutter_actor_queue_relayout: - * @self: A #ClutterActor - * - * Indicates that the actor's size request or other layout-affecting - * properties may have changed. This function is used inside #ClutterActor - * subclass implementations, not by applications directly. - * - * Queueing a new layout automatically queues a redraw as well. - * - * Since: 0.8 - */ -void -clutter_actor_queue_relayout (ClutterActor *self) +static void +_clutter_actor_queue_only_relayout (ClutterActor *self) { ClutterActorPrivate *priv; @@ -5070,6 +5060,26 @@ clutter_actor_queue_relayout (ClutterActor *self) g_signal_emit (self, actor_signals[QUEUE_RELAYOUT], 0); } +/** + * clutter_actor_queue_relayout: + * @self: A #ClutterActor + * + * Indicates that the actor's size request or other layout-affecting + * properties may have changed. This function is used inside #ClutterActor + * subclass implementations, not by applications directly. + * + * Queueing a new layout automatically queues a redraw as well. + * + * Since: 0.8 + */ +void +clutter_actor_queue_relayout (ClutterActor *self) +{ + _clutter_actor_queue_only_relayout (self); + + clutter_actor_queue_redraw (self); +} + /** * clutter_actor_get_preferred_size: * @self: a #ClutterActor