mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-16 06:59:44 -05:00
render/egl: make wlr_egl_context public
This commit is contained in:
parent
3c26244340
commit
6eff6c365b
5 changed files with 36 additions and 34 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue