1
0
Fork 0

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>
This commit is contained in:
Robert Mader 2022-11-07 17:07:06 +01:00 committed by Marge Bot
parent 292a8500ed
commit 35ecaafd6b

View file

@ -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);