summaryrefslogtreecommitdiff
path: root/src/egl/main/eglsync.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-10-23 11:59:03 +0800
committerChia-I Wu <olv@lunarg.com>2010-10-23 15:19:34 +0800
commitdc4f845c37a8446de19036e24fd397a0aa864c02 (patch)
tree7b1d125da53a1a6f932eae5cdbbdbcf489474601 /src/egl/main/eglsync.c
parent662e098b560c6983f5ac320cc5ff7a82ecdc5f8a (diff)
egl: Add reference count for resources.
This is a really simple mechanism. There is no atomicity and the caller is expected to hold the display lock.
Diffstat (limited to 'src/egl/main/eglsync.c')
-rw-r--r--src/egl/main/eglsync.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c
index b9cd99a332..95e97c7354 100644
--- a/src/egl/main/eglsync.c
+++ b/src/egl/main/eglsync.c
@@ -50,10 +50,7 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
!(type == EGL_SYNC_FENCE_KHR && dpy->Extensions.KHR_fence_sync))
return _eglError(EGL_BAD_ATTRIBUTE, "eglCreateSyncKHR");
- memset(sync, 0, sizeof(*sync));
-
- sync->Resource.Display = dpy;
-
+ _eglInitResource(&sync->Resource, sizeof(*sync), dpy);
sync->Type = type;
sync->SyncStatus = EGL_UNSIGNALED_KHR;
sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;