aboutsummaryrefslogtreecommitdiff
path: root/render/egl.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-20 12:39:35 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-20 17:39:34 +0200
commitaf2f69e6c1578f848d3e3222804444ff9cff83df (patch)
treeaaf4be2b47d3e1047a24085c4bc74003c382745b /render/egl.c
parent72f28ed0b36e4f8a6a8732788bc557533ac36ab1 (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 'render/egl.c')
-rw-r--r--render/egl.c2
1 files changed, 2 insertions, 0 deletions
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;
}