feature: add ohos build
Change-Id: I297770ae07d71987c74b18c475f28b1c5d734ce7
This commit is contained in:
@@ -406,6 +406,11 @@ _eglGetPlatformDisplayCommon(EGLenum platform, void *native_display,
|
||||
case EGL_PLATFORM_ANDROID_KHR:
|
||||
disp = _eglGetAndroidDisplay(native_display, attrib_list);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_OHOS_PLATFORM
|
||||
case EGL_PLATFORM_OHOS_KHR:
|
||||
disp = _eglGetOHOSDisplay(native_display, attrib_list);
|
||||
break;
|
||||
#endif
|
||||
case EGL_PLATFORM_DEVICE_EXT:
|
||||
disp = _eglGetDeviceDisplay(native_display, attrib_list);
|
||||
|
@@ -85,6 +85,7 @@ static const struct {
|
||||
{ _EGL_PLATFORM_SURFACELESS, "surfaceless" },
|
||||
{ _EGL_PLATFORM_DEVICE, "device" },
|
||||
{ _EGL_PLATFORM_WINDOWS, "windows" },
|
||||
{ _EGL_PLATFORM_OHOS, "openharmony" },
|
||||
};
|
||||
|
||||
|
||||
@@ -608,6 +609,22 @@ _eglGetAndroidDisplay(void *native_display,
|
||||
}
|
||||
#endif /* HAVE_ANDROID_PLATFORM */
|
||||
|
||||
#ifdef HAVE_OHOS_PLATFORM
|
||||
_EGLDisplay*
|
||||
_eglGetOHOSDisplay(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_OHOS, native_display,
|
||||
attrib_list);
|
||||
}
|
||||
#endif /* HAVE_OHOS_PLATFORM */
|
||||
|
||||
_EGLDisplay*
|
||||
_eglGetDeviceDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list)
|
||||
|
@@ -52,6 +52,7 @@ enum _egl_platform_type {
|
||||
_EGL_PLATFORM_SURFACELESS,
|
||||
_EGL_PLATFORM_DEVICE,
|
||||
_EGL_PLATFORM_WINDOWS,
|
||||
_EGL_PLATFORM_OHOS,
|
||||
|
||||
_EGL_NUM_PLATFORMS,
|
||||
_EGL_INVALID_PLATFORM = -1
|
||||
@@ -329,6 +330,12 @@ _eglGetAndroidDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OHOS_PLATFORM
|
||||
_EGLDisplay*
|
||||
_eglGetOHOSDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
#endif
|
||||
|
||||
_EGLDisplay*
|
||||
_eglGetDeviceDisplay(void *native_display,
|
||||
const EGLAttrib *attrib_list);
|
||||
|
Reference in New Issue
Block a user