Apply and Track EGL_GL_COLORSPACE_KHR
As part of implementing EGL_KHR_gl_colorspace we need to
keep track of the EGL_GL_COLORSPACE_KHR so that eqlQuerySurface
gets the value the application set.
Do the work in the EGL layer because colorspace information
is not handled in the driver.
Test: adb shell /data/nativetest/EGL_test/EGL_test
Bug: 37709988
Change-Id: Ic92e717a46769144d724f4a84fb3560df076da4f
diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp
index 6238780..837cfa9 100644
--- a/opengl/libs/EGL/egl_object.cpp
+++ b/opengl/libs/EGL/egl_object.cpp
@@ -55,12 +55,15 @@
// ----------------------------------------------------------------------------
-egl_surface_t::egl_surface_t(egl_display_t* dpy, EGLConfig config,
- EGLNativeWindowType win, EGLSurface surface,
- egl_connection_t const* cnx) :
- egl_object_t(dpy), surface(surface), config(config), win(win), cnx(cnx),
- connected(true)
-{
+egl_surface_t::egl_surface_t(egl_display_t* dpy, EGLConfig config, EGLNativeWindowType win,
+ EGLSurface surface, EGLint colorSpace, egl_connection_t const* cnx)
+ : egl_object_t(dpy),
+ surface(surface),
+ config(config),
+ win(win),
+ cnx(cnx),
+ connected(true),
+ colorSpace(colorSpace) {
if (win) {
win->incStrong(this);
}