diff options
Diffstat (limited to 'src/egl/main/eglsync.h')
-rw-r--r-- | src/egl/main/eglsync.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/egl/main/eglsync.h b/src/egl/main/eglsync.h index 09d799ba5f1..97ae67cf866 100644 --- a/src/egl/main/eglsync.h +++ b/src/egl/main/eglsync.h @@ -34,6 +34,28 @@ _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, /** + * Increment reference count for the sync. + */ +static INLINE _EGLSync * +_eglGetSync(_EGLSync *sync) +{ + if (sync) + _eglGetResource(&sync->Resource); + return sync; +} + + +/** + * Decrement reference count for the sync. + */ +static INLINE EGLBoolean +_eglPutSync(_EGLSync *sync) +{ + return (sync) ? _eglPutResource(&sync->Resource) : EGL_FALSE; +} + + +/** * Link a sync to its display and return the handle of the link. * The handle can be passed to client directly. */ |