Loading opengl/include/EGL/eglext.h +5 −0 Original line number Diff line number Diff line Loading @@ -697,6 +697,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint a #define EGL_EXT_device_query 1 #endif /* EGL_EXT_device_query */ #ifndef EGL_EXT_gl_colorspace_bt2020_hlg #define EGL_EXT_gl_colorspace_bt2020_hlg 1 #define EGL_GL_COLORSPACE_BT2020_HLG_EXT 0x333E #endif /* EGL_EXT_gl_colorspace_bt2020_hlg */ #ifndef EGL_EXT_gl_colorspace_bt2020_linear #define EGL_EXT_gl_colorspace_bt2020_linear 1 #define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F Loading opengl/libs/EGL/egl_display.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -353,8 +353,9 @@ EGLBoolean egl_display_t::initialize(EGLint* major, EGLint* minor) { // Typically that means there is an HDR capable display attached, but could be // support for attaching an HDR display. In either case, advertise support for // HDR color spaces. mExtensionString.append( "EGL_EXT_gl_colorspace_bt2020_linear EGL_EXT_gl_colorspace_bt2020_pq "); mExtensionString.append("EGL_EXT_gl_colorspace_bt2020_hlg " "EGL_EXT_gl_colorspace_bt2020_linear " "EGL_EXT_gl_colorspace_bt2020_pq "); } char const* start = gExtensionString; Loading opengl/libs/EGL/egl_platform_entries.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "egl_platform_entries.h" #include <aidl/android/hardware/graphics/common/PixelFormat.h> #include <android-base/properties.h> #include <android-base/strings.h> #include <android/hardware_buffer.h> Loading @@ -29,7 +30,6 @@ #include <private/android/AHardwareBufferHelpers.h> #include <stdlib.h> #include <string.h> #include <aidl/android/hardware/graphics/common/PixelFormat.h> #include <condition_variable> #include <deque> Loading Loading @@ -421,11 +421,14 @@ static android_dataspace dataSpaceFromEGLColorSpace(EGLint colorspace) { return HAL_DATASPACE_V0_SCRGB; } else if (colorspace == EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT) { return HAL_DATASPACE_V0_SCRGB_LINEAR; } else if (colorspace == EGL_GL_COLORSPACE_BT2020_HLG_EXT) { return static_cast<android_dataspace>(HAL_DATASPACE_BT2020_HLG); } else if (colorspace == EGL_GL_COLORSPACE_BT2020_LINEAR_EXT) { return HAL_DATASPACE_BT2020_LINEAR; } else if (colorspace == EGL_GL_COLORSPACE_BT2020_PQ_EXT) { return HAL_DATASPACE_BT2020_PQ; } return HAL_DATASPACE_UNKNOWN; } Loading @@ -452,6 +455,9 @@ static std::vector<EGLint> getDriverColorSpaces(egl_display_t* dp) { if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_scrgb_linear")) { colorSpaces.push_back(EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT); } if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_bt2020_hlg")) { colorSpaces.push_back(EGL_GL_COLORSPACE_BT2020_HLG_EXT); } if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_bt2020_linear")) { colorSpaces.push_back(EGL_GL_COLORSPACE_BT2020_LINEAR_EXT); } Loading Loading @@ -485,6 +491,7 @@ static EGLBoolean processAttributes(egl_display_t* dp, ANativeWindow* window, case EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT: case EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT: case EGL_GL_COLORSPACE_SCRGB_EXT: case EGL_GL_COLORSPACE_BT2020_HLG_EXT: case EGL_GL_COLORSPACE_BT2020_LINEAR_EXT: case EGL_GL_COLORSPACE_BT2020_PQ_EXT: case EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT: Loading Loading
opengl/include/EGL/eglext.h +5 −0 Original line number Diff line number Diff line Loading @@ -697,6 +697,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint a #define EGL_EXT_device_query 1 #endif /* EGL_EXT_device_query */ #ifndef EGL_EXT_gl_colorspace_bt2020_hlg #define EGL_EXT_gl_colorspace_bt2020_hlg 1 #define EGL_GL_COLORSPACE_BT2020_HLG_EXT 0x333E #endif /* EGL_EXT_gl_colorspace_bt2020_hlg */ #ifndef EGL_EXT_gl_colorspace_bt2020_linear #define EGL_EXT_gl_colorspace_bt2020_linear 1 #define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F Loading
opengl/libs/EGL/egl_display.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -353,8 +353,9 @@ EGLBoolean egl_display_t::initialize(EGLint* major, EGLint* minor) { // Typically that means there is an HDR capable display attached, but could be // support for attaching an HDR display. In either case, advertise support for // HDR color spaces. mExtensionString.append( "EGL_EXT_gl_colorspace_bt2020_linear EGL_EXT_gl_colorspace_bt2020_pq "); mExtensionString.append("EGL_EXT_gl_colorspace_bt2020_hlg " "EGL_EXT_gl_colorspace_bt2020_linear " "EGL_EXT_gl_colorspace_bt2020_pq "); } char const* start = gExtensionString; Loading
opengl/libs/EGL/egl_platform_entries.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "egl_platform_entries.h" #include <aidl/android/hardware/graphics/common/PixelFormat.h> #include <android-base/properties.h> #include <android-base/strings.h> #include <android/hardware_buffer.h> Loading @@ -29,7 +30,6 @@ #include <private/android/AHardwareBufferHelpers.h> #include <stdlib.h> #include <string.h> #include <aidl/android/hardware/graphics/common/PixelFormat.h> #include <condition_variable> #include <deque> Loading Loading @@ -421,11 +421,14 @@ static android_dataspace dataSpaceFromEGLColorSpace(EGLint colorspace) { return HAL_DATASPACE_V0_SCRGB; } else if (colorspace == EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT) { return HAL_DATASPACE_V0_SCRGB_LINEAR; } else if (colorspace == EGL_GL_COLORSPACE_BT2020_HLG_EXT) { return static_cast<android_dataspace>(HAL_DATASPACE_BT2020_HLG); } else if (colorspace == EGL_GL_COLORSPACE_BT2020_LINEAR_EXT) { return HAL_DATASPACE_BT2020_LINEAR; } else if (colorspace == EGL_GL_COLORSPACE_BT2020_PQ_EXT) { return HAL_DATASPACE_BT2020_PQ; } return HAL_DATASPACE_UNKNOWN; } Loading @@ -452,6 +455,9 @@ static std::vector<EGLint> getDriverColorSpaces(egl_display_t* dp) { if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_scrgb_linear")) { colorSpaces.push_back(EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT); } if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_bt2020_hlg")) { colorSpaces.push_back(EGL_GL_COLORSPACE_BT2020_HLG_EXT); } if (findExtension(dp->disp.queryString.extensions, "EGL_EXT_gl_colorspace_bt2020_linear")) { colorSpaces.push_back(EGL_GL_COLORSPACE_BT2020_LINEAR_EXT); } Loading Loading @@ -485,6 +491,7 @@ static EGLBoolean processAttributes(egl_display_t* dp, ANativeWindow* window, case EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT: case EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT: case EGL_GL_COLORSPACE_SCRGB_EXT: case EGL_GL_COLORSPACE_BT2020_HLG_EXT: case EGL_GL_COLORSPACE_BT2020_LINEAR_EXT: case EGL_GL_COLORSPACE_BT2020_PQ_EXT: case EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT: Loading