mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
u/pacing: Make the comp time be at least 2ms in fake pacer
This commit is contained in:
parent
b9b9ced43d
commit
57070ad620
|
@ -198,6 +198,11 @@ u_pc_fake_create(uint64_t estimated_frame_period_ns, uint64_t now_ns, struct u_p
|
|||
// 20% of the frame time.
|
||||
ft->comp_time_ns = get_percent_of_time(estimated_frame_period_ns, 20);
|
||||
|
||||
// Or at least 2ms.
|
||||
if (ft->comp_time_ns < U_TIME_1MS_IN_NS * 2) {
|
||||
ft->comp_time_ns = U_TIME_1MS_IN_NS * 2;
|
||||
}
|
||||
|
||||
// Make the next present time be in the future.
|
||||
ft->last_present_time_ns = now_ns + U_TIME_1MS_IN_NS * 50;
|
||||
|
||||
|
|
Loading…
Reference in a new issue