Make backends always specify output repaint time
authorJonas Ådahl <jadahl@gmail.com>
Fri, 5 Apr 2013 21:07:11 +0000 (23:07 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 8 Apr 2013 18:24:03 +0000 (14:24 -0400)
commite5a1225bc436f86b5241152bb332014d64f5b446
tree53ba499a646ba92e4e36ef3266c01c4f3c60c1bc
parentb76237e508d7440ce3f210b03d03f09723506436
Make backends always specify output repaint time

Most backends relies on gettimeofday(2) for output repaint timestamps
but this is not a requirement. Before this patch repaints coming from
idle_repaint() always used gettimeofday(2) for timestamps. For backends
not using that time source this could cause large jumps between
timestamps.

To fix this, timestamps needs to always come from the backend. This
means that the backend needs to always be responsible of starting the
repaint loop in case that the repaint cannot start immediately.

The drm backend implementation is from the patch by Ander Conselvan de
Oliveira found here:
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007393.html

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/compositor-drm.c
src/compositor-fbdev.c
src/compositor-headless.c
src/compositor-rdp.c
src/compositor-rpi.c
src/compositor-wayland.c
src/compositor-x11.c
src/compositor.c
src/compositor.h