backend-rdp: Use weston_output_finish_frame_from_timer()

Replace the finish frame handler logic with a call to the
weston_output_finish_frame_from_timer() helper function.

This makes finish_frame_handler() return more exact timestamps
calculated from the previous frame time if the timer callback
was not delayed too much.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Philipp Zabel 2023-09-18 15:05:32 +02:00 committed by Marius Vlad
parent 98cd2e9f97
commit 8888777b26

View file

@ -308,10 +308,8 @@ static int
finish_frame_handler(void *data)
{
struct rdp_output *output = data;
struct timespec ts;
weston_compositor_read_presentation_clock(output->base.compositor, &ts);
weston_output_finish_frame(&output->base, &ts, 0);
weston_output_finish_frame_from_timer(&output->base);
return 1;
}