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
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 3312b03..42049a4 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -456,7 +456,7 @@
// 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) {