egl: replace _EGLDriver with _EGLDisplay->Driver in _eglGetSyncAttrib()
[mesa.git] / src / egl / main / eglsync.h
index cd2d78326f9e38d47774eed62fedeb9b837b154b..4fdf15f231e6d2edda1edc41cd43b27b4c7a673a 100644 (file)
@@ -47,17 +47,19 @@ struct _egl_sync
    EGLenum Type;
    EGLenum SyncStatus;
    EGLenum SyncCondition;
+   EGLAttrib CLEvent;
+   EGLint SyncFd;
 };
 
 
-PUBLIC EGLBoolean
-_eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
-             const EGLint *attrib_list);
+extern EGLBoolean
+_eglInitSync(_EGLSync *sync, _EGLDisplay *disp, EGLenum type,
+             const EGLAttrib *attrib_list);
 
 
 extern EGLBoolean
-_eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
-                     EGLint attribute, EGLint *value);
+_eglGetSyncAttrib(_EGLDisplay *disp, _EGLSync *sync,
+                  EGLint attribute, EGLAttrib *value);
 
 
 /**
@@ -86,11 +88,11 @@ _eglPutSync(_EGLSync *sync)
  * Link a sync to its display and return the handle of the link.
  * The handle can be passed to client directly.
  */
-static inline EGLSyncKHR
+static inline EGLSync
 _eglLinkSync(_EGLSync *sync)
 {
    _eglLinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
-   return (EGLSyncKHR) sync;
+   return (EGLSync) sync;
 }
 
 
@@ -109,10 +111,10 @@ _eglUnlinkSync(_EGLSync *sync)
  * Return NULL if the handle has no corresponding linked sync.
  */
 static inline _EGLSync *
-_eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
+_eglLookupSync(EGLSync handle, _EGLDisplay *disp)
 {
    _EGLSync *sync = (_EGLSync *) handle;
-   if (!dpy || !_eglCheckResource((void *) sync, _EGL_RESOURCE_SYNC, dpy))
+   if (!disp || !_eglCheckResource((void *) sync, _EGL_RESOURCE_SYNC, disp))
       sync = NULL;
    return sync;
 }
@@ -121,12 +123,12 @@ _eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
 /**
  * Return the handle of a linked sync, or EGL_NO_SYNC_KHR.
  */
-static inline EGLSyncKHR
+static inline EGLSync
 _eglGetSyncHandle(_EGLSync *sync)
 {
    _EGLResource *res = (_EGLResource *) sync;
    return (res && _eglIsResourceLinked(res)) ?
-      (EGLSyncKHR) sync : EGL_NO_SYNC_KHR;
+      (EGLSync) sync : EGL_NO_SYNC_KHR;
 }