From 37b8a096a9907ea9c9991750c75d9fb15e445681 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sun, 22 Oct 2017 10:20:26 +1300 Subject: Pass backend to render --- render/gles2/renderer.c | 7 +++---- types/wlr_output.c | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index cf4a0aab..646d69ec 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -246,9 +246,8 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend) { return NULL; } wlr_renderer_init(&renderer->wlr_renderer, &wlr_renderer_impl); - if (backend) { - struct wlr_egl *egl = wlr_backend_get_egl(backend); - renderer->egl = egl; - } + + renderer->egl = wlr_backend_get_egl(backend); + return &renderer->wlr_renderer; } diff --git a/types/wlr_output.c b/types/wlr_output.c index c89c5c45..03cff0bb 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -153,8 +153,7 @@ static bool set_cursor(struct wlr_output *output, const uint8_t *buf, output->cursor.height = height; if (!output->cursor.renderer) { - /* NULL egl is okay given that we are only using pixel buffers */ - output->cursor.renderer = wlr_gles2_renderer_create(NULL); + output->cursor.renderer = wlr_gles2_renderer_create(output->backend); if (!output->cursor.renderer) { return false; } -- cgit v1.2.3