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. --- backend/multi/backend.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'backend/multi') diff --git a/backend/multi/backend.c b/backend/multi/backend.c index fccad5b4..8c36834e 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -63,20 +63,6 @@ static void multi_backend_destroy(struct wlr_backend *wlr_backend) { free(backend); } -static clockid_t multi_backend_get_presentation_clock( - struct wlr_backend *backend) { - struct wlr_multi_backend *multi = multi_backend_from_backend(backend); - - struct subbackend_state *sub; - wl_list_for_each(sub, &multi->backends, link) { - if (sub->backend->impl->get_presentation_clock) { - return wlr_backend_get_presentation_clock(sub->backend); - } - } - - return CLOCK_MONOTONIC; -} - static int multi_backend_get_drm_fd(struct wlr_backend *backend) { struct wlr_multi_backend *multi = multi_backend_from_backend(backend); @@ -115,7 +101,6 @@ static uint32_t multi_backend_get_buffer_caps(struct wlr_backend *backend) { static const struct wlr_backend_impl backend_impl = { .start = multi_backend_start, .destroy = multi_backend_destroy, - .get_presentation_clock = multi_backend_get_presentation_clock, .get_drm_fd = multi_backend_get_drm_fd, .get_buffer_caps = multi_backend_get_buffer_caps, }; -- cgit v1.2.3