stage-view: Bump fake swap ready notify callback priority

This will become important when dispatching happens from a frame clock
driver, where the driver itself triggers from a GSource. If the driver
source has a higher priority, we'll risk dispatching before the frame
clock has returned to a state expecting to be dispatched.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4065>
This commit is contained in:
Jonas Ådahl 2024-10-02 14:56:35 +02:00 committed by Marge Bot
parent e417643d78
commit 2e068dd124

View File

@ -218,8 +218,12 @@ meta_stage_view_perform_fake_swap (MetaStageView *view,
}; };
g_warn_if_fail (priv->notify_presented_handle_id == 0); g_warn_if_fail (priv->notify_presented_handle_id == 0);
/* The priority needs to be higher than the source dispatching the frame
* clock, to avoid racing with it.
*/
priv->notify_presented_handle_id = priv->notify_presented_handle_id =
g_idle_add_full (G_PRIORITY_DEFAULT, g_idle_add_full (G_PRIORITY_HIGH,
notify_presented_idle, notify_presented_idle,
closure, g_free); closure, g_free);
} }