aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/backend.c8
-rw-r--r--backend/drm/drm.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index bcc81624..a7e6824c 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -12,6 +12,7 @@
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/list.h>
#include <wlr/util/log.h>
+#include <wlr/egl.h>
#include "backend/udev.h"
#include "backend/drm.h"
@@ -38,9 +39,14 @@ static void wlr_drm_backend_destroy(struct wlr_backend_state *drm) {
free(drm);
}
+static struct wlr_egl *wlr_drm_backend_get_egl(struct wlr_backend_state *drm) {
+ return &drm->renderer.egl;
+}
+
static struct wlr_backend_impl backend_impl = {
.init = wlr_drm_backend_init,
- .destroy = wlr_drm_backend_destroy
+ .destroy = wlr_drm_backend_destroy,
+ .get_egl = wlr_drm_backend_get_egl
};
static void session_signal(struct wl_listener *listener, void *data) {
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index e11751e2..927388b0 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(&output->renderer->egl);
+ plane->wlr_rend = wlr_gles2_renderer_init(drm->base);
if (!plane->wlr_rend) {
return false;
}