Skip to content

clutter: do less when removing actors

Christian Hergert requested to merge wip/chergert/has-accessible into master

When removing ClutterActor we often hit paths which can be made to disappear entirely.

ClutterActor was using g_signal_emit_by_name() to emit ::actor-removed and ::actor-added. This does extra work to look up type information for the interface (and some mallocs) before the emission. This can completely go away with an emit_actor_added() and emit_actor_removed() helper.

A bit more useful is that cally_actor_real_remove_actor() is fetching an accessible for the removed actor. Doing so causes the creation of a new accessible during the destruction cycle causing a bunch of objects to be created unnecessarily.

Merge request reports