Don't delay initial output paint
authorDaniel Stone <daniels@collabora.com>
Wed, 1 Mar 2017 11:34:05 +0000 (11:34 +0000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 13 Mar 2017 12:20:06 +0000 (14:20 +0200)
commit3615ce195562b89de328d64c754b3b3114123321
tree7e1b40fc99c76cb983dbb64c2d7d3af4461dea92
parent84aff5c77aff83188256cc176bc65b297a32f9d1
Don't delay initial output paint

On startup, we cannot lock on to the repaint timer because it is unknown
to us. We deal with this by claiming that the moment of entry into the
repaint loop is the moment a frame returned, causing finish_frame to
delay our initial repaint to (refresh_time - repaint_delay), typically
around 9ms of utterly wasted time.

Add an explicit stamp == NULL, to determine that we are just beginning
our repaint loop, that the timings are in fact totally invalid, and that
it would be beneficial to repaint the output immediately. This will only
trigger when the display had previously been disabled or the previous
state is unknown, e.g. at startup, or coming back from DPMS off.

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