diff options
author | Kyle Brenneman <[email protected]> | 2016-09-12 16:42:56 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2016-09-14 11:45:58 -0400 |
commit | 017946b7247ea7c36219b44dfc118ccad4da7d1d (patch) | |
tree | 9e9f8855727348b355825761d308bc28d23c4a21 /src/egl | |
parent | fe6ffa79be7ecf66b7bec73389556a58e8f6432c (diff) |
egl: Factor out _eglGetPlatformDisplayCommon
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl')
-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 ba8305e08ed..df355a50424 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -295,9 +295,9 @@ eglGetDisplay(EGLNativeDisplayType nativeDisplay) return _eglGetDisplayHandle(dpy); } -static EGLDisplay EGLAPIENTRY -eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, - const EGLint *attrib_list) +static EGLDisplay +_eglGetPlatformDisplayCommon(EGLenum platform, void *native_display, + const EGLint *attrib_list) { _EGLDisplay *dpy; @@ -326,17 +326,25 @@ eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, return _eglGetDisplayHandle(dpy); } +static EGLDisplay EGLAPIENTRY +eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, + const EGLint *attrib_list) +{ + return _eglGetPlatformDisplayCommon(platform, native_display, attrib_list); +} + EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, void *native_display, const EGLAttrib *attrib_list) { EGLDisplay display; - EGLint *int_attribs = _eglConvertAttribsToInt(attrib_list); + EGLint *int_attribs; + int_attribs = _eglConvertAttribsToInt(attrib_list); if (attrib_list && !int_attribs) RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, NULL); - display = eglGetPlatformDisplayEXT(platform, native_display, int_attribs); + display = _eglGetPlatformDisplayCommon(platform, native_display, int_attribs); free(int_attribs); return display; } |