mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/egl: introduce wlr_egl_unset_current
This function can be called after wlr_egl_make_current to cleanup the EGL context. This avoids having lingering EGL contexts that make things work by chance. Closes: https://github.com/swaywm/wlroots/issues/2197
This commit is contained in:
parent
781ed1ff02
commit
1edc42157b
8 changed files with 62 additions and 29 deletions
|
|
@ -157,14 +157,14 @@ static bool output_commit(struct wlr_output *wlr_output) {
|
|||
wlr_output_send_present(wlr_output, NULL);
|
||||
}
|
||||
|
||||
wlr_egl_make_current(&x11->egl, EGL_NO_SURFACE, NULL);
|
||||
wlr_egl_unset_current(&x11->egl);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void output_rollback(struct wlr_output *wlr_output) {
|
||||
struct wlr_x11_output *output = get_x11_output_from_output(wlr_output);
|
||||
wlr_egl_make_current(&output->x11->egl, EGL_NO_SURFACE, NULL);
|
||||
wlr_egl_unset_current(&output->x11->egl);
|
||||
}
|
||||
|
||||
static const struct wlr_output_impl output_impl = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue