aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/renderer.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2/renderer.c')
-rw-r--r--render/gles2/renderer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index e0534749..9bfaebd7 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -733,21 +733,12 @@ extern const GLchar tex_fragment_src_rgbx[];
extern const GLchar tex_fragment_src_external[];
struct wlr_renderer *wlr_gles2_renderer_create_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);
+ struct wlr_egl *egl = wlr_egl_create_with_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");