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

@ -1285,8 +1285,7 @@ clutter_texture_set_cogl_texture (ClutterTexture *texture,
g_object_notify (G_OBJECT (texture), "cogl-texture");
/* If resized actor may need resizing but paint() will do this */
if (CLUTTER_ACTOR_IS_VISIBLE (texture))
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
}
static gboolean
@ -1882,8 +1881,7 @@ clutter_texture_set_filter_quality (ClutterTexture *texture,
g_object_notify (G_OBJECT (texture), "filter-quality");
if (CLUTTER_ACTOR_IS_VISIBLE (texture))
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
}
}
@ -2124,8 +2122,7 @@ clutter_texture_set_area_from_rgb_data (ClutterTexture *texture,
/* rename signal */
g_signal_emit (texture, texture_signals[PIXBUF_CHANGE], 0);
if (CLUTTER_ACTOR_IS_VISIBLE (texture))
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
return TRUE;
}