mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -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
|
|
@ -122,9 +122,18 @@ bool wlr_egl_export_image_to_dmabuf(struct wlr_egl *egl, EGLImageKHR image,
|
|||
*/
|
||||
bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImageKHR image);
|
||||
|
||||
/**
|
||||
* Make the EGL context current. The provided surface will be made current
|
||||
* unless EGL_NO_SURFACE.
|
||||
*
|
||||
* Callers are expected to clear the current context when they are done by
|
||||
* calling wlr_egl_unset_current.
|
||||
*/
|
||||
bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface,
|
||||
int *buffer_age);
|
||||
|
||||
bool wlr_egl_unset_current(struct wlr_egl *egl);
|
||||
|
||||
bool wlr_egl_is_current(struct wlr_egl *egl);
|
||||
|
||||
bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue