actor: Do not queue relayouts on actors being destroyed

Simple optimization is simple.
This commit is contained in:
Emmanuele Bassi 2010-11-12 18:09:25 +00:00
parent 0523d6db08
commit b3f5a6e2ba

View File

@ -1865,7 +1865,7 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
N_CACHED_SIZE_REQUESTS * sizeof (SizeRequest)); N_CACHED_SIZE_REQUESTS * sizeof (SizeRequest));
/* We need to go all the way up the hierarchy */ /* We need to go all the way up the hierarchy */
if (priv->parent_actor) if (priv->parent_actor != NULL)
_clutter_actor_queue_only_relayout (priv->parent_actor); _clutter_actor_queue_only_relayout (priv->parent_actor);
} }
@ -5188,11 +5188,10 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
static void static void
_clutter_actor_queue_only_relayout (ClutterActor *self) _clutter_actor_queue_only_relayout (ClutterActor *self)
{ {
ClutterActorPrivate *priv; ClutterActorPrivate *priv = self->priv;
g_return_if_fail (CLUTTER_IS_ACTOR (self)); if (CLUTTER_ACTOR_IN_DESTRUCTION (self))
return;
priv = self->priv;
if (priv->needs_width_request && if (priv->needs_width_request &&
priv->needs_height_request && priv->needs_height_request &&