diff options
author | Robert Mader <robert.mader@posteo.de> | 2022-11-07 17:07:06 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-16 16:27:33 +0000 |
commit | 35ecaafd6b41bdb0e465f255801ca4e7148ad638 (patch) | |
tree | ccb053a9f19201e03816a3c153a053cc7d82f4c3 | |
parent | 292a8500ed45598d05fea954678e74cec9078e01 (diff) | |
download | mutter-35ecaafd6b41bdb0e465f255801ca4e7148ad638.tar.gz |
wayland/actor-surface: Optimize update scheduling
This code path is important for "empty" commits to ensure we schedule
frame callbacks even if previous commits didn't cause stage redraws.
There is, however, no reason to schedule updates on all stage views
instead of only those the actor is on.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2671>
-rw-r--r-- | src/wayland/meta-wayland-actor-surface.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index f4ad2d0e4..a00ab4361 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -307,10 +307,15 @@ meta_wayland_actor_surface_apply_state (MetaWaylandSurfaceRole *surface_role, priv->actor && !meta_surface_actor_is_obscured (priv->actor)) { - MetaBackend *backend = meta_get_backend (); - ClutterActor *stage = meta_backend_get_stage (backend); + GList *l; - clutter_stage_schedule_update (CLUTTER_STAGE (stage)); + for (l = clutter_actor_peek_stage_views (CLUTTER_ACTOR (priv->actor)); l; + l = l->next) + { + ClutterStageView *view = l->data; + + clutter_stage_view_schedule_update (view); + } } meta_wayland_actor_surface_queue_frame_callbacks (actor_surface, pending); |