backend: add timeline feature flag

The output feature flag has a flaw: it's not possible to check
whether the backend supports timelines during compositor
initialization when we need to figure out whether we want to enable
the linux-drm-syncobj-v1 protocol.

Introduce a backend-wide feature flag to indicate support for
timelines to address this defect.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3904
This commit is contained in:
Simon Ser 2024-10-10 16:23:49 +02:00 committed by Alexander Orzechowski
parent 8d8d5f5e94
commit 514c4b4cce
4 changed files with 25 additions and 0 deletions

View file

@ -29,6 +29,11 @@ struct wlr_backend_output_state {
struct wlr_backend {
const struct wlr_backend_impl *impl;
struct {
// Whether wait/signal timelines are supported in output commits
bool timeline;
} features;
struct {
/** Raised when destroyed */
struct wl_signal destroy;