aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2017-08-09 21:25:34 +0200
committernyorain <nyorain@gmail.com>2017-08-10 10:59:58 +0200
commit67369173aaafd763a6369a84917ae457c7095a72 (patch)
treec42bbcebd5b1e972c422386ce46f353c2f3a31ca /backend/drm
parent750d0ad4583732ee24c998f46a62fc684f86bc48 (diff)
Implement drm (egl) buffer attaching
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/backend.c4
-rw-r--r--backend/drm/drm.c2
2 files changed, 5 insertions, 1 deletions
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;
}