Index: third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h |
diff --git a/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h b/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h |
index 6468205fc4495f8395d791730d6cb2d2be225dff..f57d49f94a519f5125c1f2b1475a39ff5cd807d5 100644 |
--- a/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h |
+++ b/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h |
@@ -30,7 +30,9 @@ extern "C" { |
* the interface version number is reset. |
* |
* @section page_ifaces_vsync_feedback_unstable_v1 Interfaces |
- * - @subpage page_iface_zwp_vsync_feedback_v1 - Protocol for providing vertical synchronization timing |
+ * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing |
+ * - @subpage page_iface_zcr_vsync_timing_v1 - |
+ * - @subpage page_iface_zwp_vsync_feedback_v1 - DEPRECATED |
* - @subpage page_iface_zwp_vsync_timing_v1 - |
* @section page_copyright_vsync_feedback_unstable_v1 Copyright |
* <pre> |
@@ -58,10 +60,37 @@ extern "C" { |
* </pre> |
*/ |
struct wl_output; |
+struct zcr_vsync_feedback_v1; |
+struct zcr_vsync_timing_v1; |
struct zwp_vsync_feedback_v1; |
struct zwp_vsync_timing_v1; |
/** |
+ * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1 |
+ * @section page_iface_zcr_vsync_feedback_v1_desc Description |
+ * |
+ * The global interface that allows clients to subscribe for vertical |
+ * synchronization timing data for given wl_output. |
+ * @section page_iface_zcr_vsync_feedback_v1_api API |
+ * See @ref iface_zcr_vsync_feedback_v1. |
+ */ |
+/** |
+ * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface |
+ * |
+ * The global interface that allows clients to subscribe for vertical |
+ * synchronization timing data for given wl_output. |
+ */ |
+extern const struct wl_interface zcr_vsync_feedback_v1_interface; |
+/** |
+ * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1 |
+ * @section page_iface_zcr_vsync_timing_v1_api API |
+ * See @ref iface_zcr_vsync_timing_v1. |
+ */ |
+/** |
+ * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface |
+ */ |
+extern const struct wl_interface zcr_vsync_timing_v1_interface; |
+/** |
* @page page_iface_zwp_vsync_feedback_v1 zwp_vsync_feedback_v1 |
* @section page_iface_zwp_vsync_feedback_v1_desc Description |
* |
@@ -87,6 +116,163 @@ extern const struct wl_interface zwp_vsync_feedback_v1_interface; |
*/ |
extern const struct wl_interface zwp_vsync_timing_v1_interface; |
+#define ZCR_VSYNC_FEEDBACK_V1_DESTROY 0 |
+#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1 |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_feedback_v1 |
+ */ |
+#define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 |
+/** |
+ * @ingroup iface_zcr_vsync_feedback_v1 |
+ */ |
+#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1 |
+ |
+/** @ingroup iface_zcr_vsync_feedback_v1 */ |
+static inline void |
+zcr_vsync_feedback_v1_set_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, void *user_data) |
+{ |
+ wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_feedback_v1, user_data); |
+} |
+ |
+/** @ingroup iface_zcr_vsync_feedback_v1 */ |
+static inline void * |
+zcr_vsync_feedback_v1_get_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) |
+{ |
+ return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_feedback_v1); |
+} |
+ |
+static inline uint32_t |
+zcr_vsync_feedback_v1_get_version(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) |
+{ |
+ return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_feedback_v1); |
+} |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_feedback_v1 |
+ * |
+ * Destroy this vsync feedback object. Existing vsync timing objects shall |
+ * not be affected by this request. |
+ */ |
+static inline void |
+zcr_vsync_feedback_v1_destroy(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) |
+{ |
+ wl_proxy_marshal((struct wl_proxy *) zcr_vsync_feedback_v1, |
+ ZCR_VSYNC_FEEDBACK_V1_DESTROY); |
+ |
+ wl_proxy_destroy((struct wl_proxy *) zcr_vsync_feedback_v1); |
+} |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_feedback_v1 |
+ * |
+ * Create a new vsync timing object that represents a subscription to |
+ * vertical synchronization timing updates of given wl_output object. |
+ * |
+ * The newly created object will immediately signal an update to notify |
+ * the subscriber of initial timing parameters. |
+ */ |
+static inline struct zcr_vsync_timing_v1 * |
+zcr_vsync_feedback_v1_get_vsync_timing(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, struct wl_output *output) |
+{ |
+ struct wl_proxy *id; |
+ |
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_vsync_feedback_v1, |
+ ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING, &zcr_vsync_timing_v1_interface, NULL, output); |
+ |
+ return (struct zcr_vsync_timing_v1 *) id; |
+} |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_timing_v1 |
+ * @struct zcr_vsync_timing_v1_listener |
+ */ |
+struct zcr_vsync_timing_v1_listener { |
+ /** |
+ * vsync timing updated |
+ * |
+ * Notifies client that vertical synchronization timing of given |
+ * wl_output has changed. |
+ * |
+ * Timing information consists of two data, timebase and interval. |
+ * Timebase is an absolute timestamp of the vsync event that caused |
+ * the timing to change. Interval is a period of time between |
+ * subsequent vsync events. |
+ * |
+ * The unit of all above mentioned time values shall be |
+ * microseconds and absolute timestamps should match the realm of |
+ * the primary system monotonic counter, i.e. the POSIX |
+ * clock_gettime(CLOCK_MONOTONIC). Data type of both values is |
+ * defined to be a 64-bit unsigned integer, but since the biggest |
+ * unsigned integer datatype defined by the Wayland protocol is the |
+ * 32-bit uint, both timebase and interval are split into most |
+ * significant and least significant part, suffixed by "_h" and |
+ * "_l" respectively. |
+ * @param timebase_l new vsync timebase (lower 32 bits) |
+ * @param timebase_h new vsync timebase (upper 32 bits) |
+ * @param interval_l new vsync interval (lower 32 bits) |
+ * @param interval_h new vsync interval (upper 32 bits) |
+ */ |
+ void (*update)(void *data, |
+ struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, |
+ uint32_t timebase_l, |
+ uint32_t timebase_h, |
+ uint32_t interval_l, |
+ uint32_t interval_h); |
+}; |
+ |
+/** |
+ * @ingroup zcr_vsync_timing_v1_iface |
+ */ |
+static inline int |
+zcr_vsync_timing_v1_add_listener(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, |
+ const struct zcr_vsync_timing_v1_listener *listener, void *data) |
+{ |
+ return wl_proxy_add_listener((struct wl_proxy *) zcr_vsync_timing_v1, |
+ (void (**)(void)) listener, data); |
+} |
+ |
+#define ZCR_VSYNC_TIMING_V1_DESTROY 0 |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_timing_v1 |
+ */ |
+#define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1 |
+ |
+/** @ingroup iface_zcr_vsync_timing_v1 */ |
+static inline void |
+zcr_vsync_timing_v1_set_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, void *user_data) |
+{ |
+ wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_timing_v1, user_data); |
+} |
+ |
+/** @ingroup iface_zcr_vsync_timing_v1 */ |
+static inline void * |
+zcr_vsync_timing_v1_get_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) |
+{ |
+ return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_timing_v1); |
+} |
+ |
+static inline uint32_t |
+zcr_vsync_timing_v1_get_version(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) |
+{ |
+ return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_timing_v1); |
+} |
+ |
+/** |
+ * @ingroup iface_zcr_vsync_timing_v1 |
+ * |
+ * Destroy this vsync timing object. |
+ */ |
+static inline void |
+zcr_vsync_timing_v1_destroy(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) |
+{ |
+ wl_proxy_marshal((struct wl_proxy *) zcr_vsync_timing_v1, |
+ ZCR_VSYNC_TIMING_V1_DESTROY); |
+ |
+ wl_proxy_destroy((struct wl_proxy *) zcr_vsync_timing_v1); |
+} |
+ |
#define ZWP_VSYNC_FEEDBACK_V1_DESTROY 0 |
#define ZWP_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1 |