wayland: fix frame pacing regression, schedule frame after dispatch
The extra wlr_scene_output_commit broke frame pacing in nested mode by consuming the host frame callback. Instead, move wlr_output_schedule_frame to after wl_event_loop_dispatch so client commits processed during dispatch are rendered on the next frame event.
This commit is contained in:
parent
ee434b024a
commit
69db74b3a6
|
|
@ -3675,14 +3675,11 @@ wl_event_loop_run(void)
|
|||
struct wl_event_loop *loop = wl_display_get_event_loop(wl_state.display);
|
||||
while (!wl_state.terminate) {
|
||||
wl_display_flush_clients(wl_state.display);
|
||||
wl_event_loop_dispatch(loop, 16);
|
||||
/* Schedule frame AFTER dispatch so the frame event on the next
|
||||
* iteration renders content from commits processed above. */
|
||||
if (wl_state.output)
|
||||
wlr_output_schedule_frame(wl_state.output);
|
||||
wl_event_loop_dispatch(loop, 16);
|
||||
|
||||
/* Commit scene after dispatch to pick up any client surface
|
||||
* updates that arrived during this iteration. */
|
||||
if (wl_state.scene_output && wl_state.allocator)
|
||||
wlr_scene_output_commit(wl_state.scene_output, NULL);
|
||||
|
||||
/* Check inotify for defaults database changes */
|
||||
#ifdef HAVE_INOTIFY
|
||||
|
|
|
|||
Loading…
Reference in New Issue