diff options
author | Jonas Dreßler <verdre@v0yd.nl> | 2020-10-24 23:50:51 +0200 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2020-10-26 13:45:57 +0000 |
commit | 52e2afa2ec7028e2ca206a07b9ea062448bfa855 (patch) | |
tree | 6ea9a8b4dfd1ac2fc305f6867c899f4dba2a9fa9 | |
parent | da7671b547ba9fa407fb7e0b313048354d92e840 (diff) | |
download | mutter-52e2afa2ec7028e2ca206a07b9ea062448bfa855.tar.gz |
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
-rw-r--r-- | clutter/clutter/clutter-actor.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 604438269..10a733690 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -16049,12 +16049,8 @@ 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); - } + if (!sorted_lists_equal (old_stage_views, priv->stage_views)) + g_signal_emit (self, actor_signals[STAGE_VIEWS_CHANGED], 0); } static void |