[mutter/gbsneto/graphene-frustrum: 6/17] 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: 6/17] clutter/actor: Trivial code shuffling
- Date: Sun, 11 Oct 2020 22:44:35 +0000 (UTC)
commit 6c082cec3ecf4eef213a9397f50dd836958e52ad
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 4f560135e3..5103fc7dc2 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3454,9 +3454,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): "
@@ -3465,6 +3462,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]