Lines Matching refs:sync
42 /* A sync is a display resource */
54 _eglInitSync(_EGLSync *sync, _EGLDisplay *disp, EGLenum type,
59 _eglGetSyncAttrib(_EGLDisplay *disp, _EGLSync *sync,
64 * Increment reference count for the sync.
67 _eglGetSync(_EGLSync *sync)
69 if (sync)
70 _eglGetResource(&sync->Resource);
71 return sync;
76 * Decrement reference count for the sync.
79 _eglPutSync(_EGLSync *sync)
81 return (sync) ? _eglPutResource(&sync->Resource) : EGL_FALSE;
86 * Link a sync to its display and return the handle of the link.
90 _eglLinkSync(_EGLSync *sync)
92 _eglLinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
93 return (EGLSync) sync;
98 * Unlink a linked sync from its display.
101 _eglUnlinkSync(_EGLSync *sync)
103 _eglUnlinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
108 * Lookup a handle to find the linked sync.
109 * Return NULL if the handle has no corresponding linked sync.
114 _EGLSync *sync = (_EGLSync *) handle;
115 if (!disp || !_eglCheckResource((void *) sync, _EGL_RESOURCE_SYNC, disp))
116 sync = NULL;
117 return sync;
122 * Return the handle of a linked sync, or EGL_NO_SYNC_KHR.
125 _eglGetSyncHandle(_EGLSync *sync)
127 _EGLResource *res = (_EGLResource *) sync;
129 (EGLSync) sync : EGL_NO_SYNC_KHR;