From 4ea84c5765b138153aa313f23288935192b75c42 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sat, 21 Oct 2017 17:35:37 +1300 Subject: Remove unnecesary wlr_renderers --- backend/drm/drm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'backend/drm/drm.c') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index ff4dc7f6..0e898d3f 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -177,9 +177,6 @@ void wlr_drm_resources_free(struct wlr_drm_backend *drm) { if (plane->wlr_tex) { wlr_texture_destroy(plane->wlr_tex); } - if (plane->wlr_rend) { - wlr_renderer_destroy(plane->wlr_rend); - } } free(drm->crtcs); @@ -525,12 +522,7 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output, // TODO the image needs to be rotated depending on the output rotation - plane->wlr_rend = wlr_gles2_renderer_create(&drm->backend); - if (!plane->wlr_rend) { - return false; - } - - plane->wlr_tex = wlr_render_texture_create(plane->wlr_rend); + plane->wlr_tex = wlr_render_texture_create(plane->surf.renderer->wlr_rend); if (!plane->wlr_tex) { return false; } @@ -595,7 +587,7 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output, float matrix[16]; wlr_texture_get_matrix(plane->wlr_tex, &matrix, &plane->matrix, 0, 0); - wlr_render_with_matrix(plane->wlr_rend, plane->wlr_tex, &matrix); + wlr_render_with_matrix(plane->surf.renderer->wlr_rend, plane->wlr_tex, &matrix); glFinish(); glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, bo_stride); -- cgit v1.2.3