From b061a00f4cde1bdf1406bbf94b87fb88e996987a Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 5 Jun 2009 16:25:39 +0100 Subject: [PATCH] [ClutterActor] Fix check for zero opacity when being painted from a clone Clutter short-circuits painting when an actor's opacity is zero. However if the actor is being painted from a ClutterClone then it will be painted using the clone's opacity instead so the test was broken. --- clutter/clutter-actor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 3aac1c1fc..5de7aa8ce 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -2271,7 +2271,9 @@ clutter_actor_paint (ClutterActor *self) /* It's an important optimization that we consider painting of * actors with 0 opacity to be a NOP... */ if (G_LIKELY (context->pick_mode == CLUTTER_PICK_NONE) && - priv->opacity == 0) + /* If the actor is being painted from a clone then check the + clone's opacity instead */ + (priv->opacity_parent ? priv->opacity_parent->priv : priv)->opacity == 0) { priv->queued_redraw = FALSE; return;