mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
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
This commit is contained in:
parent
01ccc54ce8
commit
964229acf4
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user