diff options
Diffstat (limited to 'render/wlr_renderer.c')
-rw-r--r-- | render/wlr_renderer.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 4a565b1d..7ce86695 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -251,22 +251,12 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r, } struct wlr_renderer *wlr_renderer_autocreate_with_drm_fd(int drm_fd) { - struct gbm_device *gbm_device = gbm_create_device(drm_fd); - if (!gbm_device) { - wlr_log(WLR_ERROR, "Failed to create GBM device"); - return NULL; - } - - struct wlr_egl *egl = wlr_egl_create(EGL_PLATFORM_GBM_KHR, gbm_device, - NULL); + struct wlr_egl *egl = wlr_egl_create_from_drm_fd(drm_fd); if (egl == NULL) { wlr_log(WLR_ERROR, "Could not initialize EGL"); - gbm_device_destroy(gbm_device); return NULL; } - egl->gbm_device = gbm_device; - struct wlr_renderer *renderer = wlr_gles2_renderer_create(egl); if (!renderer) { wlr_log(WLR_ERROR, "Failed to create GLES2 renderer"); |