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.
This commit is contained in:
Simon Ser 2023-10-30 18:37:13 +01:00
parent 5fac9b1beb
commit 1c24b1182b
12 changed files with 13 additions and 56 deletions

View file

@ -913,9 +913,7 @@ void wlr_output_send_present(struct wlr_output *output,
struct timespec now;
if (event->presented && event->when == NULL) {
clockid_t clock = wlr_backend_get_presentation_clock(output->backend);
errno = 0;
if (clock_gettime(clock, &now) != 0) {
if (clock_gettime(CLOCK_MONOTONIC, &now) != 0) {
wlr_log_errno(WLR_ERROR, "failed to send output present event: "
"failed to read clock");
return;