diff options
author | Robert Mader <robert.mader@posteo.de> | 2022-11-07 17:07:06 +0100 |
---|---|---|
committer | Robert Mader <robert.mader@collabora.com> | 2023-01-06 13:53:08 +0100 |
commit | 931f2662a5d4382003d1b82c5fc9b44eafee80b1 (patch) | |
tree | d90385eed79463e0b88b37d62b1af41394bb0b97 | |
parent | 5cb1cb03065b3a089b02faa7bbf016e026a937a9 (diff) | |
download | mutter-931f2662a5d4382003d1b82c5fc9b44eafee80b1.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>
(cherry picked from commit 35ecaafd6b41bdb0e465f255801ca4e7148ad638)
-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 1230f6cf0..ba8da47ff 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -304,10 +304,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); |