1
0
Fork 0

clutter/frame-clock: Throttle back to double buffering for direct scanout

There's no compositing during direct scanout so the "render" time is zero.
Thus there is no need to implement triple buffering for direct scanouts.
Stick to double buffering and enjoy the lower latency.
This commit is contained in:
Daniel van Vugt 2021-09-07 19:15:55 +08:00
parent 5fb8b37183
commit 53888593a8

View file

@ -940,6 +940,13 @@ clutter_frame_clock_schedule_update (ClutterFrameClock *frame_clock)
case CLUTTER_FRAME_CLOCK_STATE_DISPATCHED_ONE_AND_SCHEDULED_NOW:
return;
case CLUTTER_FRAME_CLOCK_STATE_DISPATCHED_ONE:
if (frame_clock->last_flip_hints & CLUTTER_FRAME_HINT_DIRECT_SCANOUT_ATTEMPTED)
{
/* Force double buffering, disable triple buffering */
frame_clock->pending_reschedule = TRUE;
return;
}
calculate_next_update_time_us (frame_clock,
&next_update_time_us,
&frame_clock->next_presentation_time_us,