From af2f69e6c1578f848d3e3222804444ff9cff83df Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 20 May 2020 12:39:35 +0200 Subject: 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 --- render/egl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'render') diff --git a/render/egl.c b/render/egl.c index ec00a12f..3003c9c5 100644 --- a/render/egl.c +++ b/render/egl.c @@ -449,6 +449,8 @@ bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface, wlr_log(WLR_ERROR, "eglSwapBuffers failed"); return false; } + + wlr_egl_unset_current(egl); return true; } -- cgit v1.2.3