From 67369173aaafd763a6369a84917ae457c7095a72 Mon Sep 17 00:00:00 2001 From: nyorain Date: Wed, 9 Aug 2017 21:25:34 +0200 Subject: Implement drm (egl) buffer attaching --- backend/drm/backend.c | 4 ++++ backend/drm/drm.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'backend/drm') diff --git a/backend/drm/backend.c b/backend/drm/backend.c index e361358e..bcc81624 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -149,6 +149,10 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, goto error_event; } + if (!wlr_egl_bind_display(&drm->renderer.egl, display)) { + wlr_log(L_INFO, "Failed to bind egl/wl display: %s", egl_error()); + } + return backend; error_event: diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1c83af3e..e11751e2 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -579,7 +579,7 @@ static bool wlr_drm_output_set_cursor(struct wlr_output_state *output, wlr_matrix_texture(plane->matrix, plane->width, plane->height, output->base->transform ^ WL_OUTPUT_TRANSFORM_FLIPPED_180); - plane->wlr_rend = wlr_gles2_renderer_init(); + plane->wlr_rend = wlr_gles2_renderer_init(&output->renderer->egl); if (!plane->wlr_rend) { return false; } -- cgit v1.2.3