Revert "render: add wlr_egl_create_from_drm_fd function"

This reverts commit ee31be167b.
This commit is contained in:
Simon Ser 2021-01-20 21:20:55 +01:00
parent 54e5ef39c0
commit 7c995b78b2
3 changed files with 46 additions and 149 deletions

View file

@ -251,12 +251,22 @@ bool wlr_renderer_init_wl_display(struct wlr_renderer *r,
}
struct wlr_renderer *wlr_renderer_autocreate_with_drm_fd(int drm_fd) {
struct wlr_egl *egl = wlr_egl_create_from_drm_fd(drm_fd);
if (egl == NULL) {
wlr_log(WLR_ERROR, "Could not initialize EGL");
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);
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");