[mutter/gbsneto/graphene-frustrum: 8/19] clutter/actor: Trivial code shuffling
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-frustrum: 8/19] clutter/actor: Trivial code shuffling
- Date: Tue, 13 Oct 2020 11:33:26 +0000 (UTC)
commit 87e5bae5f84a55e17e44b37f8e7eaa3bfe511222
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.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
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 59b5fa207e..3c0aa422c5 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3457,9 +3457,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): "
@@ -3468,6 +3465,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]