diff options
author | Kyle Brenneman <[email protected]> | 2016-09-12 17:44:36 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2016-09-14 11:45:58 -0400 |
commit | 5b0b844ac9818672bc3ddcdbbb74cb892b3485f4 (patch) | |
tree | c15716cdcee026360e37a86313bc6d07caf17562 /src/egl/main | |
parent | 9a992038e722b6ea8362db1dfcf2dd5a78888391 (diff) |
egl: Factor out _eglWaitSyncCommon
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglapi.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 58d18f18a8b..dd4fd2cbbbc 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1509,11 +1509,9 @@ eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) } -static EGLint EGLAPIENTRY -eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) +static EGLint +_eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags) { - _EGLDisplay *disp = _eglLockDisplay(dpy); - _EGLSync *s = _eglLookupSync(sync, disp); _EGLContext *ctx = _eglGetCurrentContext(); _EGLDriver *drv; EGLint ret; @@ -1534,6 +1532,14 @@ eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) RETURN_EGL_EVAL(disp, ret); } +static EGLint EGLAPIENTRY +eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLSync *s = _eglLookupSync(sync, disp); + return _eglWaitSyncCommon(disp, s, flags); +} + EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) @@ -1542,7 +1548,9 @@ eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) * EGLBoolean. In both cases, the return values can only be EGL_FALSE and * EGL_TRUE. */ - return eglWaitSyncKHR(dpy, sync, flags); + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLSync *s = _eglLookupSync(sync, disp); + return _eglWaitSyncCommon(disp, s, flags); } |