From 5a074190960130b6136a398d83da43fd1e8ec7e2 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 31 Dec 2019 15:39:40 +0100 Subject: wayland: optionally use the presentation time protocol to measure input lag This adds a flag, -p,--presentation-timings, that enables input lag measuring using the presentation time Wayland protocol. When enabled, we store a timestamp when we *send* a key to the slave. Then, when we commit a frame for rendering to the compositor, we request presentation feedback. We also store a timestamp for when the frame was committed. The 'presented' callback then looks at the input and commit timestamps, and compares it with the presented timestamp. The delay is logged at INFO when the delay was less than one frame interval, at WARN when it was one frame interval, and at ERR when it was two or more frame intervals. We also update statistic counters that we log when foot is shut down. --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 5169de73..786ab7c9 100644 --- a/meson.build +++ b/meson.build @@ -40,6 +40,7 @@ foreach prot : [ wayland_protocols_datadir + '/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml', wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml', wayland_protocols_datadir + '/unstable/primary-selection/primary-selection-unstable-v1.xml', + wayland_protocols_datadir + '/stable/presentation-time/presentation-time.xml', ] wl_proto_headers += custom_target( -- cgit v1.3