From 1c24b1182ba39cb8c508580713336dcf79e6a295 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 30 Oct 2023 18:37:13 +0100 Subject: backend: drop wlr_backend_get_presentation_clock() We can just assume CLOCK_MONOTONIC everywhere. Simplifies the backend API, and fixes clock mismatches when multiple backends are used together with different clocks. --- include/wlr/backend.h | 4 ---- include/wlr/backend/interface.h | 2 -- include/wlr/types/wlr_presentation_time.h | 1 - 3 files changed, 7 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/backend.h b/include/wlr/backend.h index fac49f06..9a8a2d87 100644 --- a/include/wlr/backend.h +++ b/include/wlr/backend.h @@ -51,10 +51,6 @@ bool wlr_backend_start(struct wlr_backend *backend); * automatically when the struct wl_display is destroyed. */ void wlr_backend_destroy(struct wlr_backend *backend); -/** - * Returns the clock used by the backend for presentation feedback. - */ -clockid_t wlr_backend_get_presentation_clock(struct wlr_backend *backend); /** * Returns the DRM node file descriptor used by the backend's underlying * platform. Can be used by consumers for additional rendering operations. diff --git a/include/wlr/backend/interface.h b/include/wlr/backend/interface.h index 8b922f1d..da57cae9 100644 --- a/include/wlr/backend/interface.h +++ b/include/wlr/backend/interface.h @@ -10,13 +10,11 @@ #define WLR_BACKEND_INTERFACE_H #include -#include #include struct wlr_backend_impl { bool (*start)(struct wlr_backend *backend); void (*destroy)(struct wlr_backend *backend); - clockid_t (*get_presentation_clock)(struct wlr_backend *backend); int (*get_drm_fd)(struct wlr_backend *backend); uint32_t (*get_buffer_caps)(struct wlr_backend *backend); }; diff --git a/include/wlr/types/wlr_presentation_time.h b/include/wlr/types/wlr_presentation_time.h index a8df292d..9543cff6 100644 --- a/include/wlr/types/wlr_presentation_time.h +++ b/include/wlr/types/wlr_presentation_time.h @@ -21,7 +21,6 @@ struct wlr_output_event_present; struct wlr_presentation { struct wl_global *global; - clockid_t clock; struct { struct wl_signal destroy; -- cgit v1.2.3