render/allocator: drop allocator_autocreate_with_drm_fd()

This is now unused.
This commit is contained in:
Simon Ser 2024-11-07 18:55:01 +01:00
parent 4c4d74a564
commit c0945b6613
2 changed files with 9 additions and 25 deletions

View File

@ -1,9 +0,0 @@
#ifndef RENDER_ALLOCATOR_ALLOCATOR_H
#define RENDER_ALLOCATOR_ALLOCATOR_H
#include <wlr/render/allocator.h>
struct wlr_allocator *allocator_autocreate_with_drm_fd(
uint32_t backend_caps, struct wlr_renderer *renderer, int drm_fd);
#endif

View File

@ -9,7 +9,6 @@
#include <xf86drm.h>
#include <xf86drmMode.h>
#include "backend/backend.h"
#include "render/allocator/allocator.h"
#include "render/allocator/drm_dumb.h"
#include "render/allocator/shm.h"
#include "render/wlr_renderer.h"
@ -91,11 +90,17 @@ static int reopen_drm_node(int drm_fd, bool allow_render_node) {
return new_fd;
}
struct wlr_allocator *allocator_autocreate_with_drm_fd(
uint32_t backend_caps, struct wlr_renderer *renderer,
int drm_fd) {
struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
struct wlr_renderer *renderer) {
uint32_t backend_caps = backend_get_buffer_caps(backend);
uint32_t renderer_caps = renderer->render_buffer_caps;
// Note, drm_fd may be negative if unavailable
int drm_fd = wlr_backend_get_drm_fd(backend);
if (drm_fd < 0) {
drm_fd = wlr_renderer_get_drm_fd(renderer);
}
struct wlr_allocator *alloc = NULL;
uint32_t gbm_caps = WLR_BUFFER_CAP_DMABUF;
@ -145,18 +150,6 @@ struct wlr_allocator *allocator_autocreate_with_drm_fd(
return NULL;
}
struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
struct wlr_renderer *renderer) {
uint32_t backend_caps = backend_get_buffer_caps(backend);
// Note, drm_fd may be negative if unavailable
int drm_fd = wlr_backend_get_drm_fd(backend);
if (drm_fd < 0) {
drm_fd = wlr_renderer_get_drm_fd(renderer);
}
return allocator_autocreate_with_drm_fd(backend_caps, renderer, drm_fd);
}
void wlr_allocator_destroy(struct wlr_allocator *alloc) {
if (alloc == NULL) {
return;