clutter/actor: Don't check handlers when emitting stage-views-changed

Turns out the g_signal_has_handler_pending() call in
update_stage_views() is actually more expensive than comparing the
sorted list (which is usually very short), so remove that and simply
always emit the signal.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1524
This commit is contained in:
Jonas Dreßler 2020-10-24 23:50:51 +02:00 committed by Georges Basile Stavracas Neto
parent da7671b547
commit 52e2afa2ec

View File

@ -16049,13 +16049,9 @@ update_stage_views (ClutterActor *self)
&bounding_rect);
out:
if (g_signal_has_handler_pending (self, actor_signals[STAGE_VIEWS_CHANGED],
0, TRUE))
{
if (!sorted_lists_equal (old_stage_views, priv->stage_views))
g_signal_emit (self, actor_signals[STAGE_VIEWS_CHANGED], 0);
}
}
static void
update_resource_scale (ClutterActor *self,