|
|
@ -18,11 +18,11 @@ void wlr_allocator_init(struct wlr_allocator *alloc,
|
|
|
|
wl_signal_init(&alloc->events.destroy);
|
|
|
|
wl_signal_init(&alloc->events.destroy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
|
|
|
|
struct wlr_allocator *allocator_autocreate_with_drm_fd(
|
|
|
|
struct wlr_renderer *renderer) {
|
|
|
|
struct wlr_backend *backend, struct wlr_renderer *renderer,
|
|
|
|
|
|
|
|
int drm_fd) {
|
|
|
|
uint32_t backend_caps = backend_get_buffer_caps(backend);
|
|
|
|
uint32_t backend_caps = backend_get_buffer_caps(backend);
|
|
|
|
uint32_t renderer_caps = renderer_get_render_buffer_caps(renderer);
|
|
|
|
uint32_t renderer_caps = renderer_get_render_buffer_caps(renderer);
|
|
|
|
int drm_fd = wlr_backend_get_drm_fd(backend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_allocator *alloc = NULL;
|
|
|
|
struct wlr_allocator *alloc = NULL;
|
|
|
|
uint32_t gbm_caps = WLR_BUFFER_CAP_DMABUF;
|
|
|
|
uint32_t gbm_caps = WLR_BUFFER_CAP_DMABUF;
|
|
|
@ -51,6 +51,13 @@ struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_allocator *wlr_allocator_autocreate(struct wlr_backend *backend,
|
|
|
|
|
|
|
|
struct wlr_renderer *renderer) {
|
|
|
|
|
|
|
|
// Note, drm_fd may be negative if unavailable
|
|
|
|
|
|
|
|
int drm_fd = wlr_backend_get_drm_fd(backend);
|
|
|
|
|
|
|
|
return allocator_autocreate_with_drm_fd(backend, renderer, drm_fd);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_allocator_destroy(struct wlr_allocator *alloc) {
|
|
|
|
void wlr_allocator_destroy(struct wlr_allocator *alloc) {
|
|
|
|
if (alloc == NULL) {
|
|
|
|
if (alloc == NULL) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|