diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-20 12:39:35 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-20 17:39:34 +0200 |
commit | af2f69e6c1578f848d3e3222804444ff9cff83df (patch) | |
tree | aaf4be2b47d3e1047a24085c4bc74003c382745b /backend/drm/renderer.c | |
parent | 72f28ed0b36e4f8a6a8732788bc557533ac36ab1 (diff) |
render/egl: unset current context after swapping buffers
After swapping buffers, it doesn't make sense to perform more rendering
operations. Unset the context to reflect this.
This commit makes it so the context is always only current between
wlr_egl_make_current and wlr_egl_swap_buffers.
This is an alternative to [1].
[1]: https://github.com/swaywm/wlroots/pull/2212
Diffstat (limited to 'backend/drm/renderer.c')
-rw-r--r-- | backend/drm/renderer.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index 4d83bf31..c82663e6 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -370,8 +370,6 @@ bool drm_surface_render_black_frame(struct wlr_drm_surface *surf) { 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; } @@ -415,8 +413,6 @@ 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"); |