Account for very large repaint window misses
authorDaniel Stone <daniels@collabora.com>
Tue, 28 Feb 2017 21:53:51 +0000 (21:53 +0000)
committerDaniel Stone <daniels@collabora.com>
Tue, 2 May 2017 18:18:38 +0000 (19:18 +0100)
commiteca5cca56125052003861529eb2c181b420845aa
tree8c9503b9fee4256be7f7d75c8f12c9302f45bc86
parent9ad4de1f7ad411fcb5a62eb85e17cf96ae076a0f
Account for very large repaint window misses

At the bottom of weston_output_finish_frame(), code exists to account
for flips which have missed the repaint window, by shifting them to lock
on to the next repaint window rather than repainting immediately.

This code only accounted for flips which missed their target by one
repaint window. If they miss by multiples of the repaint window, adjust
them until the next repaint timestamp is in the future. This will only
happen in fairly extreme situations, such as Weston being scheduled out
for a punitively long period of time. Nevertheless, try to help recovery
by still aiming for more predictable timings.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
libweston/compositor.c