forked from enlightenment/efl
Evas GL: Add support for bind_wayland_display extension
This provides EGL_WL_bind_wayland_display EGL extension to bind and unbind the wl_display of a wayland server to an EGLDisplay. @feature
This commit is contained in:
parent
cf8801e6cf
commit
9eefb3ea89
|
@ -4123,6 +4123,27 @@ EvasGLImage *img = glapi->evasglCreateImageForContext
|
|||
int (*evasglWaitSync) (Evas_GL *evas_gl, EvasGLSync sync, int flags);
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Evas GL Wayland functions
|
||||
* @since 1.13
|
||||
* @{ */
|
||||
/**
|
||||
* @anchor evasglBindWaylandDisplay
|
||||
* @brief Requires the extension @c EGL_WL_bind_wayland_display, similar to eglBindWaylandDisplayWL.
|
||||
*/
|
||||
Eina_Bool (*evasglBindWaylandDisplay) (Evas_GL *evas_gl, void *wl_display);
|
||||
/**
|
||||
* @anchor evasglUnbindWaylandDisplay
|
||||
* @brief Requires the extension @c EGL_WL_bind_wayland_display, similar to eglUnbindWaylandDisplayWL.
|
||||
*/
|
||||
Eina_Bool (*evasglUnbindWaylandDisplay) (Evas_GL *evas_gl, void *wl_display);
|
||||
/**
|
||||
* @anchor evasglQueryWaylandBuffer
|
||||
* @brief Requires the extension @c EGL_WL_bind_wayland_display, similar to eglQueryWaylandBufferWL.
|
||||
*/
|
||||
Eina_Bool (*evasglQueryWaylandBuffer) (Evas_GL *evas_gl, void *buffer, int attribute, int *value);
|
||||
/** @} */
|
||||
|
||||
/* future calls will be added down here for expansion */
|
||||
};
|
||||
|
||||
|
|
|
@ -243,6 +243,33 @@ evgl_evasglWaitSync(Evas_GL *evas_gl EINA_UNUSED,
|
|||
return EXT_FUNC(eglWaitSyncKHR)(dpy, sync, flags);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
evgl_evasglBindWaylandDisplay(Evas_GL *evas_gl EINA_UNUSED,
|
||||
void *wl_display)
|
||||
{
|
||||
EGLDisplay dpy = EGLDISPLAY_GET();
|
||||
if (!dpy) return EINA_FALSE;
|
||||
return EXT_FUNC(eglBindWaylandDisplayWL)(dpy, wl_display);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
evgl_evasglUnbindWaylandDisplay(Evas_GL *evas_gl EINA_UNUSED,
|
||||
void *wl_display)
|
||||
{
|
||||
EGLDisplay dpy = EGLDISPLAY_GET();
|
||||
if (!dpy) return EINA_FALSE;
|
||||
return EXT_FUNC(eglUnbindWaylandDisplayWL)(dpy, wl_display);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
evgl_evasglQueryWaylandBuffer(Evas_GL *evas_gl EINA_UNUSED,
|
||||
void *buffer, int attribute, int *value)
|
||||
{
|
||||
EGLDisplay dpy = EGLDISPLAY_GET();
|
||||
if (!dpy) return EINA_FALSE;
|
||||
return EXT_FUNC(eglQueryWaylandBufferWL)(dpy, buffer, attribute, value);
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
#endif
|
||||
|
|
|
@ -1600,6 +1600,32 @@ _EVASGL_EXT_BEGIN(EGL_KHR_wait_sync)
|
|||
|
||||
_EVASGL_EXT_END()
|
||||
|
||||
_EVASGL_EXT_BEGIN(EGL_WL_bind_wayland_display)
|
||||
|
||||
_EVASGL_EXT_DRVNAME(EGL_WL_bind_wayland_display)
|
||||
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(EGLBoolean, eglBindWaylandDisplayWL, (EGLDisplay dpy, struct wl_display *display))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("eglBindWaylandDisplayWL")
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_END()
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(EGLBoolean, eglUnbindWaylandDisplayWL, (EGLDisplay dpy, struct wl_display *display))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("eglUnbindWaylandDisplayWL")
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_END()
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(EGLBoolean, eglQueryWaylandBufferWL, (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC_PROCADDR("eglQueryWaylandBufferWL")
|
||||
_EVASGL_EXT_FUNCTION_PRIVATE_END()
|
||||
|
||||
_EVASGL_EXT_FUNCTION_BEGIN(Eina_Bool, evasglBindWaylandDisplay, (Evas_GL *evas_gl, void *wl_display))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC(evgl_evasglBindWaylandDisplay)
|
||||
_EVASGL_EXT_FUNCTION_END()
|
||||
_EVASGL_EXT_FUNCTION_BEGIN(Eina_Bool, evasglUnbindWaylandDisplay, (Evas_GL *evas_gl, void *wl_display))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC(evgl_evasglUnbindWaylandDisplay)
|
||||
_EVASGL_EXT_FUNCTION_END()
|
||||
_EVASGL_EXT_FUNCTION_BEGIN(Eina_Bool, evasglQueryWaylandBuffer, (Evas_GL *evas_gl, void *buffer, int attribute, int *value))
|
||||
_EVASGL_EXT_FUNCTION_DRVFUNC(evgl_evasglQueryWaylandBuffer)
|
||||
_EVASGL_EXT_FUNCTION_END()
|
||||
|
||||
_EVASGL_EXT_END()
|
||||
|
||||
|
||||
#if 0
|
||||
_EVASGL_EXT_BEGIN(EGL_SEC_map_image)
|
||||
|
|
Loading…
Reference in New Issue