render/egl: make wlr_egl_context public

This commit is contained in:
Simon Zeni 2021-09-21 09:36:44 -04:00
parent 3c26244340
commit 6eff6c365b
5 changed files with 36 additions and 34 deletions

View file

@ -29,6 +29,13 @@
#include <wlr/render/dmabuf.h>
#include <wlr/render/drm_format_set.h>
struct wlr_egl_context {
EGLDisplay display;
EGLContext context;
EGLSurface draw_surface;
EGLSurface read_surface;
};
struct wlr_egl {
EGLDisplay display;
EGLContext context;
@ -80,4 +87,16 @@ bool wlr_egl_unset_current(struct wlr_egl *egl);
bool wlr_egl_is_current(struct wlr_egl *egl);
/**
* Save the current EGL context to the structure provided in the argument.
*
* This includes display, context, draw surface and read surface.
*/
void wlr_egl_context_save(struct wlr_egl_context *context);
/**
* Restore EGL context that was previously saved using wlr_egl_context_save().
*/
bool wlr_egl_context_restore(struct wlr_egl_context *context);
#endif