presentation-shm: Allow setting of delay before surface.commit
authorMario Kleiner <mario.kleiner.de@gmail.com>
Sun, 21 Jun 2015 19:25:16 +0000 (21:25 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 16 Jul 2015 10:51:03 +0000 (13:51 +0300)
commitc1809b230c5225a4d65513bf1a69c825e609369a
tree92ee809f032061e19c3b50a014b39d46bccbb3b0
parent2abe4455466b990d01f51b00f99d70d8ec21209c
presentation-shm: Allow setting of delay before surface.commit

A new optional parameter "-d msecs" allows to specify a
delay before the surface attach/damage/commit to shift
the point in time when a surface update is committed.

This allows to test how different client timings interact
with the compositors repaint timing.

Suggested by Pekka Paalanen.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v2: Clarify the intent, doing a delay in window_create_feedback()
    is a bit surprising. Use nanosleep() instead of clock_nanosleep(),
    which may not support the chosen presentation clock.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
clients/presentation-shm.c