@ -93,9 +93,8 @@ static int reopen_drm_node(int drm_fd, bool allow_render_node) {
}
}
struct wlr_allocator * allocator_autocreate_with_drm_fd (
struct wlr_allocator * allocator_autocreate_with_drm_fd (
struct wlr_backend * backend , struct wlr_renderer * renderer ,
uint32_t backend_caps , struct wlr_renderer * renderer ,
int drm_fd ) {
int drm_fd ) {
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 ) ;
struct wlr_allocator * alloc = NULL ;
struct wlr_allocator * alloc = NULL ;
@ -149,12 +148,14 @@ struct wlr_allocator *allocator_autocreate_with_drm_fd(
struct wlr_allocator * wlr_allocator_autocreate ( struct wlr_backend * backend ,
struct wlr_allocator * wlr_allocator_autocreate ( struct wlr_backend * backend ,
struct wlr_renderer * renderer ) {
struct wlr_renderer * renderer ) {
uint32_t backend_caps = backend_get_buffer_caps ( backend ) ;
// Note, drm_fd may be negative if unavailable
// Note, drm_fd may be negative if unavailable
int drm_fd = wlr_backend_get_drm_fd ( backend ) ;
int drm_fd = wlr_backend_get_drm_fd ( backend ) ;
if ( drm_fd < 0 ) {
if ( drm_fd < 0 ) {
drm_fd = wlr_renderer_get_drm_fd ( renderer ) ;
drm_fd = wlr_renderer_get_drm_fd ( renderer ) ;
}
}
return allocator_autocreate_with_drm_fd ( backend , renderer , drm_fd ) ;
return allocator_autocreate_with_drm_fd ( backend_caps , renderer , drm_fd ) ;
}
}
void wlr_allocator_destroy ( struct wlr_allocator * alloc ) {
void wlr_allocator_destroy ( struct wlr_allocator * alloc ) {