render/egl: add wlr_egl_get_{context,display}

This allows compositors to integrate with the wlroots GLES2
renderer, if they need to perform custom GL rendering.
This commit is contained in:
Simon Ser 2022-05-25 17:42:24 +02:00 committed by Simon Zeni
parent 4b77eadf06
commit 452a8ec940
2 changed files with 24 additions and 0 deletions

View file

@ -583,6 +583,14 @@ void wlr_egl_destroy(struct wlr_egl *egl) {
free(egl);
}
EGLDisplay wlr_egl_get_display(struct wlr_egl *egl) {
return egl->display;
}
EGLContext wlr_egl_get_context(struct wlr_egl *egl) {
return egl->context;
}
bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
if (!egl->exts.KHR_image_base) {
return false;