egl: Enable eglGetPlatformDisplay on Android Platform
This helps to add eglGetPlatformDisplay support on Android Platform. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:

committed by
Eric Engestrom

parent
02c6cd8481
commit
500b45a98a
@@ -405,6 +405,11 @@ _eglGetPlatformDisplayCommon(EGLenum platform, void *native_display,
|
||||
case EGL_PLATFORM_SURFACELESS_MESA:
|
||||
disp = _eglGetSurfacelessDisplay(native_display, attrib_list);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
case EGL_PLATFORM_ANDROID_KHR:
|
||||
disp = _eglGetAndroidDisplay(native_display, attrib_list);
|
||||
break;
|
||||
#endif
|
||||
case EGL_PLATFORM_DEVICE_EXT:
|
||||
disp = _eglGetDeviceDisplay(native_display, attrib_list);
|
||||
|
@@ -568,6 +568,22 @@ _eglGetSurfacelessDisplay(void *native_display,
|
||||
}
|
||||
#endif /* HAVE_SURFACELESS_PLATFORM */
|
||||
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
_EGLDisplay*
|
||||
_eglGetAndroidDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list)
|
||||
{
|
||||
|
||||
/* This platform recognizes no display attributes. */
|
||||
if (attrib_list != NULL && attrib_list[0] != EGL_NONE) {
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _eglFindDisplay(_EGL_PLATFORM_ANDROID, native_display,
|
||||
attrib_list);
|
||||
}
|
||||
#endif /* HAVE_ANDROID_PLATFORM */
|
||||
|
||||
_EGLDisplay*
|
||||
_eglGetDeviceDisplay(void *native_display,
|
||||
|
@@ -315,6 +315,12 @@ _eglGetSurfacelessDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
_EGLDisplay*
|
||||
_eglGetAndroidDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
#endif
|
||||
|
||||
_EGLDisplay*
|
||||
_eglGetDeviceDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
|
Reference in New Issue
Block a user