From 9463c860e8d8e7d5764be80953a01cf949a53970 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 13 Oct 2021 16:33:23 -0400 Subject: [PATCH] backend: remove get_presentation_clock from interface Since 1367a4a1c0f44fe69d9f809a35f872f6ef18b7a9, only CLOCK_MONOTONIC is supported. --- backend/backend.c | 7 ------- backend/multi/backend.c | 15 --------------- include/wlr/backend/interface.h | 1 - 3 files changed, 23 deletions(-) diff --git a/backend/backend.c b/backend/backend.c index ed6ae2d651..63d9cb34f0 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -153,13 +153,6 @@ static struct wlr_session *session_create_and_wait(struct wl_display *disp) { return session; } -clockid_t wlr_backend_get_presentation_clock(struct wlr_backend *backend) { - if (backend->impl->get_presentation_clock) { - return backend->impl->get_presentation_clock(backend); - } - return CLOCK_MONOTONIC; -} - int wlr_backend_get_drm_fd(struct wlr_backend *backend) { if (!backend->impl->get_drm_fd) { return -1; diff --git a/backend/multi/backend.c b/backend/multi/backend.c index 7c74959eb0..e7500e25b8 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -82,20 +82,6 @@ static struct wlr_session *multi_backend_get_session( return backend->session; } -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); @@ -114,7 +100,6 @@ static const struct wlr_backend_impl backend_impl = { .destroy = multi_backend_destroy, .get_renderer = multi_backend_get_renderer, .get_session = multi_backend_get_session, - .get_presentation_clock = multi_backend_get_presentation_clock, .get_drm_fd = multi_backend_get_drm_fd, }; diff --git a/include/wlr/backend/interface.h b/include/wlr/backend/interface.h index 529f8f87a7..bb3fb25102 100644 --- a/include/wlr/backend/interface.h +++ b/include/wlr/backend/interface.h @@ -18,7 +18,6 @@ struct wlr_backend_impl { void (*destroy)(struct wlr_backend *backend); struct wlr_renderer *(*get_renderer)(struct wlr_backend *backend); struct wlr_session *(*get_session)(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); };