mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
wip: backend props
This commit is contained in:
parent
214df8eda0
commit
16cec14591
5 changed files with 20 additions and 24 deletions
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef BACKEND_WLR_BACKEND_H
|
||||
#define BACKEND_WLR_BACKEND_H
|
||||
|
||||
#include <wlr/backend.h>
|
||||
|
||||
/**
|
||||
* Get the supported buffer capabilities.
|
||||
*
|
||||
* This functions returns a bitfield of supported wlr_buffer_cap.
|
||||
*/
|
||||
uint32_t backend_get_buffer_caps(struct wlr_backend *backend);
|
||||
|
||||
#endif
|
||||
|
|
@ -30,6 +30,16 @@ struct wlr_backend {
|
|||
} events;
|
||||
};
|
||||
|
||||
/**
|
||||
* Backend properties.
|
||||
*/
|
||||
struct wlr_backend_props {
|
||||
/* Supported buffer capabilities, bitfield of enum wlr_buffer_cap */
|
||||
uint32_t buffer_caps;
|
||||
/* Clock used for presentation feedback */
|
||||
clockid_t presentation_clock;
|
||||
};
|
||||
|
||||
/**
|
||||
* Automatically initializes the most suitable backend given the environment.
|
||||
* Will always return a multi-backend. The backend is created but not started.
|
||||
|
|
@ -51,6 +61,10 @@ bool wlr_backend_start(struct wlr_backend *backend);
|
|||
* automatically when the struct wl_display is destroyed.
|
||||
*/
|
||||
void wlr_backend_destroy(struct wlr_backend *backend);
|
||||
/**
|
||||
* Get backend properties.
|
||||
*/
|
||||
const struct wlr_backend_props *wlr_backend_get_props(struct wlr_backend *backend);
|
||||
/**
|
||||
* Returns the clock used by the backend for presentation feedback.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
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);
|
||||
const struct wlr_backend_props *(*get_props)(struct wlr_backend *backend);
|
||||
int (*get_drm_fd)(struct wlr_backend *backend);
|
||||
uint32_t (*get_buffer_caps)(struct wlr_backend *backend);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue