Merge branch 'master' into 1.0-integration
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 22 May 2009 11:00:33 +0000 (12:00 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 22 May 2009 11:00:33 +0000 (12:00 +0100)
* master:
  [cogl-vertex-buffer] Ensure the clip state before rendering
  [test-text-perf] Small fix-ups
  Add a test for text performance
  [build] Ensure that cogl-debug is disabled by default
  [build] The cogl GE macro wasn't passing an int according to the format string
  Use the right internal format for GL_ARB_texture_rectangle
  [actor_paint] Ensure painting is a NOP for actors with opacity = 0
  Make backface culling work with vertex buffers

1  2 
clutter/clutter-actor.c

@@@ -2250,12 -1561,25 +2250,19 @@@ clutter_actor_paint (ClutterActor *self
    g_return_if_fail (CLUTTER_IS_ACTOR (self));
  
    priv = self->priv;
+   context = clutter_context_get_default ();
+   /* 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)
+     return;
  
 -  if (!CLUTTER_ACTOR_IS_REALIZED (self))
 -    {
 -      CLUTTER_NOTE (PAINT, "Attempting realize via paint()");
 -      clutter_actor_realize(self);
 -
 -      if (!CLUTTER_ACTOR_IS_REALIZED (self))
 -      {
 -        CLUTTER_NOTE (PAINT, "Attempt failed, aborting paint");
 -        return;
 -      }
 -    }
 +  /* if we aren't paintable (not in a toplevel with all
 +   * parents paintable) then do nothing.
 +   */
 +  if (!CLUTTER_ACTOR_IS_MAPPED (self))
 +    return;
  
    /* mark that we are in the paint process */
    CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IN_PAINT);