actor: Do not call get_opacity() from get_paint_opacity()
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 12 Feb 2010 16:18:12 +0000 (16:18 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 12 Feb 2010 16:18:12 +0000 (16:18 +0000)
We already have access to the opacity private field, there's no need to
go through the public API.

clutter/clutter-actor.c

index bc79dae..22e3040 100644 (file)
@@ -6287,13 +6287,13 @@ clutter_actor_get_paint_opacity (ClutterActor *self)
 
   priv = self->priv;
 
-  if (priv->opacity_parent)
+  if (priv->opacity_parent != NULL)
     return clutter_actor_get_paint_opacity (priv->opacity_parent);
 
   parent = priv->parent_actor;
 
   /* Factor in the actual actors opacity with parents */
-  if (G_LIKELY (parent))
+  if (G_LIKELY (parent != NULL))
     {
       guint8 opacity = clutter_actor_get_paint_opacity (parent);
 
@@ -6301,7 +6301,7 @@ clutter_actor_get_paint_opacity (ClutterActor *self)
         return (opacity * priv->opacity) / 0xff;
     }
 
-  return clutter_actor_get_opacity (self);
+  return priv->opacity;
 }
 
 /**