mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
backend: replace get_buffer_caps hook with a struct field
Do the same as wlr_renderer: the supported buffer capabilities are static for the lifetime of the backend.
This commit is contained in:
parent
9fdffba170
commit
b908d865b1
14 changed files with 44 additions and 87 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
|
||||
|
|
@ -29,6 +29,9 @@ struct wlr_backend_output_state {
|
|||
struct wlr_backend {
|
||||
const struct wlr_backend_impl *impl;
|
||||
|
||||
// Bitfield of supported buffer capabilities (see enum wlr_buffer_cap)
|
||||
uint32_t buffer_caps;
|
||||
|
||||
struct {
|
||||
// Whether wait/signal timelines are supported in output commits
|
||||
bool timeline;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ struct wlr_backend_impl {
|
|||
bool (*start)(struct wlr_backend *backend);
|
||||
void (*destroy)(struct wlr_backend *backend);
|
||||
int (*get_drm_fd)(struct wlr_backend *backend);
|
||||
uint32_t (*get_buffer_caps)(struct wlr_backend *backend);
|
||||
bool (*test)(struct wlr_backend *backend,
|
||||
const struct wlr_backend_output_state *states, size_t states_len);
|
||||
bool (*commit)(struct wlr_backend *backend,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue