never presume queuing redraws on invisible actors is redundant

This replaces code like this:
  if (CLUTTER_ACTOR_IS_VISIBLE (self))
    clutter_actor_queue_redraw (self);
with:
  clutter_actor_queue_redraw (self);

clutter_actor_queue_redraw internally knows what can be optimized when
the actor is not visible, but it also knows that the queue_redraw signal
must always be sent in case a ClutterClone is cloning a hidden actor.
This commit is contained in:
Robert Bragg
2010-02-09 19:34:32 +00:00
parent bfb271b403
commit b898f0e227
6 changed files with 27 additions and 52 deletions

View File

@ -403,8 +403,7 @@ clutter_rectangle_set_color (ClutterRectangle *rectangle,
priv->has_border = TRUE;
#endif
if (CLUTTER_ACTOR_IS_VISIBLE (rectangle))
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
g_object_notify (G_OBJECT (rectangle), "color");
g_object_notify (G_OBJECT (rectangle), "has-border");
@ -459,8 +458,7 @@ clutter_rectangle_set_border_width (ClutterRectangle *rectangle,
else
priv->has_border = FALSE;
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (rectangle)))
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
g_object_notify (G_OBJECT (rectangle), "border-width");
g_object_notify (G_OBJECT (rectangle), "has-border");
@ -530,8 +528,7 @@ clutter_rectangle_set_border_color (ClutterRectangle *rectangle,
else
priv->has_border = TRUE;
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (rectangle)))
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
clutter_actor_queue_redraw (CLUTTER_ACTOR (rectangle));
g_object_notify (G_OBJECT (rectangle), "border-color");
g_object_notify (G_OBJECT (rectangle), "has-border");