diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-19 17:43:34 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-19 21:32:38 +0200 |
commit | d28a7da95d1adeabb9f628d91c872fb2cb7fcee3 (patch) | |
tree | 25ddbb306216ded3ba765f57b748a06308f15017 /backend/drm | |
parent | cfed5766b7c5e0bfc8af3b70ed1fd15b66af2642 (diff) |
backend/drm: add missing wlr_egl_unset_current
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 2 | ||||
-rw-r--r-- | backend/drm/renderer.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1286a17f..8a16b1f5 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -967,6 +967,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output, return false; } + wlr_egl_unset_current(&plane->surf.renderer->egl); + plane->cursor_enabled = true; } diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index 09546ee6..4d83bf31 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -361,15 +361,17 @@ void drm_fb_move(struct wlr_drm_fb *new, struct wlr_drm_fb *old) { } bool drm_surface_render_black_frame(struct wlr_drm_surface *surf) { - struct wlr_renderer *renderer = surf->renderer->wlr_rend; - if (!drm_surface_make_current(surf, NULL)) { return false; } + struct wlr_renderer *renderer = surf->renderer->wlr_rend; wlr_renderer_begin(renderer, surf->width, surf->height); wlr_renderer_clear(renderer, (float[]){ 0.0, 0.0, 0.0, 1.0 }); wlr_renderer_end(renderer); + + wlr_egl_unset_current(&surf->renderer->egl); + return true; } @@ -413,6 +415,8 @@ struct gbm_bo *drm_fb_acquire(struct wlr_drm_fb *fb, struct wlr_drm_backend *drm return NULL; } + wlr_egl_unset_current(&mgpu->renderer->egl); + fb->mgpu_bo = gbm_surface_lock_front_buffer(mgpu->gbm); if (!fb->mgpu_bo) { wlr_log(WLR_ERROR, "Failed to lock front buffer"); |