[mutter/gbsneto/graphene-frustrum: 3/13] clutter/actor: Trivial code shuffling




commit faea3edeec7499c99315732e786c93b6f45b9e79
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 9 16:34:32 2020 -0300

    clutter/actor: Trivial code shuffling
    
    Retrieving the stage from the actor is almost free, but this is a
    hot path anyway and we can bail out before that.

 clutter/clutter/clutter-actor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 4ea954441c..382f4b66af 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3455,9 +3455,6 @@ cull_actor (ClutterActor        *self,
   if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CULLING))
     return FALSE;
 
-  stage = (ClutterStage *) _clutter_actor_get_stage_internal (self);
-  stage_clip = _clutter_stage_get_clip (stage);
-
   if (clutter_paint_context_is_drawing_off_stage (paint_context))
     {
       CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
@@ -3466,6 +3463,9 @@ cull_actor (ClutterActor        *self,
       return FALSE;
     }
 
+  stage = (ClutterStage *) _clutter_actor_get_stage_internal (self);
+  stage_clip = _clutter_stage_get_clip (stage);
+
   *result_out =
     _clutter_paint_volume_cull (&priv->last_paint_volume, stage_clip);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]