mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-17 06:59:43 -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
|
|
@ -560,14 +560,16 @@ bool wlr_egl_is_current(struct wlr_egl *egl) {
|
|||
return eglGetCurrentContext() == egl->context;
|
||||
}
|
||||
|
||||
void wlr_egl_save_context(struct wlr_egl_context *context) {
|
||||
|
||||
void wlr_egl_context_save(struct wlr_egl_context *context) {
|
||||
context->display = eglGetCurrentDisplay();
|
||||
context->context = eglGetCurrentContext();
|
||||
context->draw_surface = eglGetCurrentSurface(EGL_DRAW);
|
||||
context->read_surface = eglGetCurrentSurface(EGL_READ);
|
||||
}
|
||||
|
||||
bool wlr_egl_restore_context(struct wlr_egl_context *context) {
|
||||
|
||||
bool wlr_egl_context_restore(struct wlr_egl_context *context) {
|
||||
// If the saved context is a null-context, we must use the current
|
||||
// display instead of the saved display because eglMakeCurrent() can't
|
||||
// handle EGL_NO_DISPLAY.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue