mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05: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
|
|
@ -556,14 +556,14 @@ static bool drm_connector_commit(struct wlr_output *output) {
|
|||
}
|
||||
}
|
||||
|
||||
wlr_egl_make_current(&drm->renderer.egl, EGL_NO_SURFACE, NULL);
|
||||
wlr_egl_unset_current(&drm->renderer.egl);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void drm_connector_rollback(struct wlr_output *output) {
|
||||
struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend);
|
||||
wlr_egl_make_current(&drm->renderer.egl, EGL_NO_SURFACE, NULL);
|
||||
wlr_egl_unset_current(&drm->renderer.egl);
|
||||
}
|
||||
|
||||
size_t drm_crtc_get_gamma_lut_size(struct wlr_drm_backend *drm,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue