mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 15:16:13 +00:00
u/timing: Add when_predict_ns on first frame
This commit is contained in:
parent
fcc77edb8b
commit
d71ccc39ce
|
@ -207,9 +207,12 @@ static struct frame *
|
||||||
do_clean_slate_frame(struct display_timing *dt)
|
do_clean_slate_frame(struct display_timing *dt)
|
||||||
{
|
{
|
||||||
struct frame *f = create_frame(dt, STATE_PREDICTED);
|
struct frame *f = create_frame(dt, STATE_PREDICTED);
|
||||||
|
uint64_t now_ns = os_monotonic_get_ns();
|
||||||
|
|
||||||
// Wild shot in the dark.
|
// Wild shot in the dark.
|
||||||
uint64_t the_time_ns = os_monotonic_get_ns() + dt->frame_period_ns * 10;
|
uint64_t the_time_ns = os_monotonic_get_ns() + dt->frame_period_ns * 10;
|
||||||
|
f->when_predict_ns = now_ns;
|
||||||
|
f->desired_present_time_ns = the_time_ns;
|
||||||
f->predicted_display_time_ns = calc_display_time_from_present_time(dt, the_time_ns);
|
f->predicted_display_time_ns = calc_display_time_from_present_time(dt, the_time_ns);
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
|
|
Loading…
Reference in a new issue