From 4f789286e4ab7f6fecc2ccb895d79362a9b2382a Mon Sep 17 00:00:00 2001 From: Alexandros Frantzis Date: Mon, 18 Dec 2017 14:55:00 +0200 Subject: unstable: Add input-timestamps protocol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wl_pointer, wl_keyboard and wl_touch events currently use a 32-bit timestamp with millisecond resolution. In some cases, notably latency measurements, this resolution is too coarse to be useful. This protocol provides additional high-resolution timestamps events, which are emitted before the corresponding input event. Each timestamp event contains a high-resolution, and ideally higher-accuracy, version of the 'time' argument of the first subsequent supported input event. Clients that care about high-resolution timestamps just need to keep track of the last timestamp event they receive and associate it with the next supported input event that arrives. Signed-off-by: Alexandros Frantzis Reviewed-by: Pekka Paalanen Acked-by: Jonas Ådahl Reviewed-by: Daniel Stone --- unstable/input-timestamps/README | 4 + .../input-timestamps-unstable-v1.xml | 145 +++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 unstable/input-timestamps/README create mode 100644 unstable/input-timestamps/input-timestamps-unstable-v1.xml (limited to 'unstable/input-timestamps') diff --git a/unstable/input-timestamps/README b/unstable/input-timestamps/README new file mode 100644 index 0000000..3e82890 --- /dev/null +++ b/unstable/input-timestamps/README @@ -0,0 +1,4 @@ +High-resolution timestamps for input events. + +Maintainers: +Alexandros Frantzis diff --git a/unstable/input-timestamps/input-timestamps-unstable-v1.xml b/unstable/input-timestamps/input-timestamps-unstable-v1.xml new file mode 100644 index 0000000..7c5e082 --- /dev/null +++ b/unstable/input-timestamps/input-timestamps-unstable-v1.xml @@ -0,0 +1,145 @@ + + + + + Copyright © 2017 Collabora, Ltd. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol specifies a way for a client to request and receive + high-resolution timestamps for input events. + + Warning! The protocol described in this file is experimental and + backward incompatible changes may be made. Backward compatible changes + may be added together with the corresponding interface version bump. + Backward incompatible changes are done by bumping the version number in + the protocol and interface names and resetting the interface version. + Once the protocol is to be declared stable, the 'z' prefix and the + version number in the protocol and interface names are removed and the + interface version number is reset. + + + + + A global interface used for requesting high-resolution timestamps + for input events. + + + + + Informs the server that the client will no longer be using this + protocol object. Existing objects created by this object are not + affected. + + + + + + Creates a new input timestamps object that represents a subscription + to high-resolution timestamp events for all wl_keyboard events that + carry a timestamp. + + If the associated wl_keyboard object is invalidated, either through + client action (e.g. release) or server-side changes, the input + timestamps object becomes inert and the client should destroy it + by calling zwp_input_timestamps_v1.destroy. + + + + + + + + Creates a new input timestamps object that represents a subscription + to high-resolution timestamp events for all wl_pointer events that + carry a timestamp. + + If the associated wl_pointer object is invalidated, either through + client action (e.g. release) or server-side changes, the input + timestamps object becomes inert and the client should destroy it + by calling zwp_input_timestamps_v1.destroy. + + + + + + + + Creates a new input timestamps object that represents a subscription + to high-resolution timestamp events for all wl_touch events that + carry a timestamp. + + If the associated wl_touch object becomes invalid, either through + client action (e.g. release) or server-side changes, the input + timestamps object becomes inert and the client should destroy it + by calling zwp_input_timestamps_v1.destroy. + + + + + + + + + Provides high-resolution timestamp events for a set of subscribed input + events. The set of subscribed input events is determined by the + zwp_input_timestamps_manager_v1 request used to create this object. + + + + + Informs the server that the client will no longer be using this + protocol object. After the server processes the request, no more + timestamp events will be emitted. + + + + + + The timestamp event is associated with the first subsequent input event + carrying a timestamp which belongs to the set of input events this + object is subscribed to. + + The timestamp provided by this event is a high-resolution version of + the timestamp argument of the associated input event. The provided + timestamp is in the same clock domain and is at least as accurate as + the associated input event timestamp. + + The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, + each component being an unsigned 32-bit value. Whole seconds are in + tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, + and the additional fractional part in tv_nsec as nanoseconds. Hence, + for valid timestamps tv_nsec must be in [0, 999999999]. + + + + + + + + -- cgit v1.2.3