From 35ecaafd6b41bdb0e465f255801ca4e7148ad638 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 7 Nov 2022 17:07:06 +0100 Subject: [PATCH] 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: --- src/wayland/meta-wayland-actor-surface.c | 11 ++++++++--- 1 file 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);