aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-11-18 14:30:29 +0100
committerSimon Ser <contact@emersion.fr>2020-11-30 11:08:44 +0100
commitc0452539276983d93cfd8757f9159d726a2d6f3a (patch)
treed096ac216ef600de2d9c7c183138050462e91b64 /backend/headless
parent5d008d90309defd2ed15f1b9525c551ecb38e21d (diff)
backend/headless: use a format suitable for rendering
When allocating buffers, use a format suitable for rendering. This avoids picking a format that won't work.
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/backend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index 49780d88..e662d6fa 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -13,6 +13,7 @@
#include "backend/headless.h"
#include "render/drm_format_set.h"
#include "render/gbm_allocator.h"
+#include "render/wlr_renderer.h"
#include "util/signal.h"
struct wlr_headless_backend *headless_backend_from_backend(
@@ -132,12 +133,11 @@ static bool backend_init(struct wlr_headless_backend *backend,
backend->allocator = &alloc->base;
const struct wlr_drm_format_set *formats =
- wlr_renderer_get_dmabuf_formats(backend->renderer);
+ wlr_renderer_get_dmabuf_render_formats(backend->renderer);
if (formats == NULL) {
wlr_log(WLR_ERROR, "Failed to get available DMA-BUF formats from renderer");
return false;
}
- // TODO: filter modifiers with external_only=false
const struct wlr_drm_format *format =
wlr_drm_format_set_get(formats, DRM_FORMAT_XRGB8888);
if (format == NULL) {