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:
Simon Ser 2024-10-29 19:18:18 +01:00 committed by Kirill Primak
parent 9fdffba170
commit b908d865b1
14 changed files with 44 additions and 87 deletions

View file

@ -12,7 +12,6 @@
#include <wlr/config.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/util/log.h>
#include "backend/backend.h"
#include "backend/multi.h"
#include "types/wlr_output.h"
#include "util/env.h"
@ -120,14 +119,6 @@ int wlr_backend_get_drm_fd(struct wlr_backend *backend) {
return backend->impl->get_drm_fd(backend);
}
uint32_t backend_get_buffer_caps(struct wlr_backend *backend) {
if (!backend->impl->get_buffer_caps) {
return 0;
}
return backend->impl->get_buffer_caps(backend);
}
static size_t parse_outputs_env(const char *name) {
const char *outputs_str = getenv(name);
if (outputs_str == NULL) {