diff options
author | Robert Bragg <robert@linux.intel.com> | 2010-06-16 12:42:22 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2012-01-16 13:45:27 +0000 |
commit | b851bf8b356a0d1252bddaccbfd30c392352be4c (patch) | |
tree | 43781e184a0fdddb5af78feb76cff748502f0096 /src | |
parent | 4e4e4c8ba1e7569b0a9ab0ae9b73ef0e18c5357f (diff) |
egl: Adds EGL_INTEL_native_event_objects support
The EGL_INTEL_native_event_objects extension provides a mechanism for
EGL to process events based on the operating system's native event
delivery mechanism.
The extension itself doesn't actually define any events so on its own
it's somewhat benign but it provides a basis to define further extensions
that handle specific events.
Examples of events we'd hope to see become available once this extension
is in place are: Swap buffers complete events to notify when an
asynchronous eglSwapBuffers request has completed and sync object
events to notify when a sync object becomes signaled.
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/eglapi.c | 48 | ||||
-rw-r--r-- | src/egl/main/eglapi.h | 12 |
2 files changed, 60 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index b27aac1674..082a5570c9 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -366,6 +366,54 @@ eglQueryString(EGLDisplay dpy, EGLint name) EGLBoolean EGLAPIENTRY +eglPrepareEventsWaitINTEL(EGLDisplay dpy, + EGLNativeEventObjectTypeINTEL *objects, + EGLint object_size, + EGLint *num_object, + EGLint *timeout) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); + ret = drv->API.PrepareEventsWaitINTEL(drv, disp, objects, object_size, + num_object, timeout); + + RETURN_EGL_EVAL(disp, ret); +} + + +EGLBoolean EGLAPIENTRY +eglDispatchEventsINTEL(EGLDisplay dpy) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); + ret = drv->API.DispatchEventsINTEL(drv, disp); + + RETURN_EGL_EVAL(disp, ret); +} + + +EGLBoolean EGLAPIENTRY +eglForwardEventINTEL(EGLDisplay dpy, + EGLNativeEventTypeINTEL event) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); + ret = drv->API.ForwardEventINTEL(drv, disp, event); + + RETURN_EGL_EVAL(disp, ret); +} + + +EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) { diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h index 14085cb4d8..056da7bad8 100644 --- a/src/egl/main/eglapi.h +++ b/src/egl/main/eglapi.h @@ -127,6 +127,12 @@ typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *dis typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height); +#ifdef EGL_INTEL_native_event_objects +typedef EGLBoolean (*PrepareEventsWaitINTEL_t) (_EGLDriver *drv, _EGLDisplay *dpy, EGLNativeEventObjectTypeINTEL *objects, EGLint object_size, EGLint *num_object, EGLint *timeout); +typedef EGLBoolean (*DispatchEventsINTEL_t) (_EGLDriver *drv, _EGLDisplay *dpy); +typedef EGLBoolean (*ForwardEventINTEL_t) (_EGLDriver *drv, _EGLDisplay *dpy, EGLNativeEventTypeINTEL event); +#endif /* EGL_INTEL_native_event_objects */ + /** * The API dispatcher jumps through these functions */ @@ -201,6 +207,12 @@ struct _egl_api UnbindWaylandDisplayWL_t UnbindWaylandDisplayWL; #endif +#ifdef EGL_INTEL_native_event_objects + PrepareEventsWaitINTEL_t PrepareEventsWaitINTEL; + DispatchEventsINTEL_t DispatchEventsINTEL; + ForwardEventINTEL_t ForwardEventINTEL; +#endif /* EGL_INTEL_native_event_objects */ + PostSubBufferNV_t PostSubBufferNV; }; |