aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-01-07 00:10:10 -0500
committerSimon Ser <contact@emersion.fr>2021-01-07 17:11:22 +0100
commitb899a412e3eb7be76df495883de9aa2bdb3be06f (patch)
tree0858d2aedf0c252d40ab0964642f286fd1ccb931 /backend/drm
parent5773794baff0f1cf843f5585322834d050dd231b (diff)
backend: remove wlr_egl from all backends
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/renderer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 4c65afae..fd5d637d 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -30,8 +30,8 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
return false;
}
- renderer->wlr_rend = wlr_renderer_autocreate(&renderer->egl,
- EGL_PLATFORM_GBM_KHR, renderer->gbm);
+ renderer->wlr_rend = wlr_renderer_autocreate(EGL_PLATFORM_GBM_KHR,
+ renderer->gbm);
if (!renderer->wlr_rend) {
wlr_log(WLR_ERROR, "Failed to create EGL/WLR renderer");
goto error_gbm;
@@ -66,7 +66,6 @@ void finish_drm_renderer(struct wlr_drm_renderer *renderer) {
wlr_allocator_destroy(&renderer->allocator->base);
wlr_renderer_destroy(renderer->wlr_rend);
- wlr_egl_finish(&renderer->egl);
gbm_device_destroy(renderer->gbm);
}
@@ -117,7 +116,8 @@ bool drm_surface_make_current(struct wlr_drm_surface *surf,
return false;
}
- if (!wlr_egl_make_current(&surf->renderer->egl, EGL_NO_SURFACE, NULL)) {
+ struct wlr_egl *egl = wlr_gles2_renderer_get_egl(surf->renderer->wlr_rend);
+ if (!wlr_egl_make_current(egl, EGL_NO_SURFACE, NULL)) {
return false;
}
if (!wlr_renderer_bind_buffer(surf->renderer->wlr_rend, surf->back_buffer)) {
@@ -130,9 +130,10 @@ bool drm_surface_make_current(struct wlr_drm_surface *surf,
void drm_surface_unset_current(struct wlr_drm_surface *surf) {
assert(surf->back_buffer != NULL);
+ struct wlr_egl *egl = wlr_gles2_renderer_get_egl(surf->renderer->wlr_rend);
wlr_renderer_bind_buffer(surf->renderer->wlr_rend, NULL);
- wlr_egl_unset_current(&surf->renderer->egl);
+ wlr_egl_unset_current(egl);
wlr_buffer_unlock(surf->back_buffer);
surf->back_buffer = NULL;