Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf433ab5 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

EGL: translate EGL_GL_COLORSPACE_LINEAR_KHR to UNKNOWN

EGL_GL_COLORSPACE_KHR affects how GL blends and how the window
system interprets the pixel values.  Since LINEAR is the default, we
should treat it as we traditionally do

 - linear GL blending
 - UNKNOWN dataspace

The prior behavior is no longer possible until some new EGL extension
adds something like EGL_GL_COLORSPACE_SRGB_LINEAR.

Bug: 110389592
Test: boots and dumpsys to confirm
Change-Id: I1b7e8037ef042e9508f0efffb55602dfed27f937
parent a3ae0dbc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
// Translates EGL color spaces to Android data spaces.
static android_dataspace dataSpaceFromEGLColorSpace(EGLint colorspace) {
    if (colorspace == EGL_GL_COLORSPACE_LINEAR_KHR) {
        return HAL_DATASPACE_SRGB_LINEAR;
        return HAL_DATASPACE_UNKNOWN;
    } else if (colorspace == EGL_GL_COLORSPACE_SRGB_KHR) {
        return HAL_DATASPACE_SRGB;
    } else if (colorspace == EGL_GL_COLORSPACE_DISPLAY_P3_EXT) {