clutter/actor: Don't create animation info when removing transitions

_clutter_actor_get_animation_info() creates a new info when the actor
currently doesn't have one. That's unnecessary and wasteful in case
where we only need to check for transitions to remove, so switch to
_clutter_actor_get_animation_info_or_default() that falls back to
an empty static info.

Fixes: c250f602bd ("clutter/actor: Remove transitions when removing an effect")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4260>
This commit is contained in:
Florian Müllner 2025-02-11 14:46:49 +01:00 committed by Marge Bot
parent ba4cb3e021
commit c41077a7a9

View File

@ -3256,9 +3256,9 @@ static void
_clutter_actor_remove_transitions_for_prefix (ClutterActor *actor,
const char *prefix)
{
ClutterAnimationInfo *info;
const ClutterAnimationInfo *info;
info = _clutter_actor_get_animation_info (actor);
info = _clutter_actor_get_animation_info_or_defaults (actor);
if (info->transitions != NULL)
{