summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorKyle Brenneman <kbrenneman@nvidia.com>2016-09-12 17:46:04 -0400
committerAdam Jackson <ajax@redhat.com>2016-09-14 11:45:58 -0400
commit1d535c1e83ae45b67a141420298c5d08082e0ed8 (patch)
tree9935743533a1a822109f70cb96fd3f6f088b7b86 /src/egl/main
parent5b0b844ac9818672bc3ddcdbbb74cb892b3485f4 (diff)
downloadexternal_mesa3d-1d535c1e83ae45b67a141420298c5d08082e0ed8.zip
external_mesa3d-1d535c1e83ae45b67a141420298c5d08082e0ed8.tar.gz
external_mesa3d-1d535c1e83ae45b67a141420298c5d08082e0ed8.tar.bz2
egl: Factor out _eglGetSyncAttribCommon
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index dd4fd2c..1c62a80 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1570,11 +1570,9 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode)
}
-EGLBoolean EGLAPIENTRY
-eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value)
+static EGLBoolean
+_eglGetSyncAttribCommon(_EGLDisplay *disp, _EGLSync *s, EGLint attribute, EGLAttrib *value)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSync *s = _eglLookupSync(sync, disp);
_EGLDriver *drv;
EGLBoolean ret;
@@ -1586,10 +1584,20 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu
RETURN_EGL_EVAL(disp, ret);
}
+EGLBoolean EGLAPIENTRY
+eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
+ return _eglGetSyncAttribCommon(disp, s, attribute, value);
+}
+
static EGLBoolean EGLAPIENTRY
eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
EGLAttrib attrib;
EGLBoolean result;
@@ -1597,7 +1605,7 @@ eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *valu
RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, EGL_FALSE);
attrib = *value;
- result = eglGetSyncAttrib(dpy, sync, attribute, &attrib);
+ result = _eglGetSyncAttribCommon(disp, s, attribute, &attrib);
/* The EGL_KHR_fence_sync spec says this about eglGetSyncAttribKHR:
*