From 6b369c4c7cd8a52f99bbff2a57fb316b33a87495 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 21 Feb 2011 16:22:34 +0100 Subject: egl: Add EGL_WL_bind_wayland_display --- src/egl/main/eglapi.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'src/egl/main/eglapi.c') diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 4e64ce6f718..19dfd574268 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -913,6 +913,10 @@ eglGetProcAddress(const char *procname) #ifdef EGL_MESA_drm_image { "eglCreateDRMImageMESA", (_EGLProc) eglCreateDRMImageMESA }, { "eglExportDRMImageMESA", (_EGLProc) eglExportDRMImageMESA }, +#endif +#ifdef EGL_WL_bind_display + { "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL }, + { "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL }, #endif { NULL, NULL } }; @@ -1491,3 +1495,43 @@ eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, } #endif + +#ifdef EGL_WL_bind_wayland_display +struct wl_display; + +EGLBoolean EGLAPIENTRY +eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); + assert(disp->Extensions.WL_bind_wayland_display); + + if (!display) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE); + + ret = drv->API.BindWaylandDisplayWL(drv, disp, display); + + RETURN_EGL_EVAL(disp, ret); +} + +EGLBoolean EGLAPIENTRY +eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); + assert(disp->Extensions.WL_bind_wayland_display); + + if (!display) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE); + + ret = drv->API.UnbindWaylandDisplayWL(drv, disp, display); + + RETURN_EGL_EVAL(disp, ret); +} +#endif -- cgit v1.2.3