diff options
| author | 2018-04-16 10:11:31 -0700 | |
|---|---|---|
| committer | 2018-04-16 11:15:57 -0700 | |
| commit | f210217912c1d46b838d2a5cad85930b73bac13c (patch) | |
| tree | a2ee24ef2c7c358f05678ff722de7bb65c227401 /opengl | |
| parent | 936497301f0fceb303ffb5ff62ea98ae29d55116 (diff) | |
Do not strip colorspace attribute for RGB888 surfaces.
Bug: 76088973
Test: Ran an internal test app that draws a solid bar of 50% gray and
1-pixel stripes alternating between black and white to a RGB888 surface.
Verified that the display matches expectations (the stripes and the bar
are approximately the same brightness).
Change-Id: I8682dfcaecf1034d74532b051bdd528b2e5e2870
Diffstat (limited to 'opengl')
| -rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index f3a9ad8b88..d6c254d527 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -489,6 +489,9 @@ static EGLBoolean stripAttributes(egl_display_ptr dp, const EGLint* attrib_list, bool haveColorSpaceSupport = dp->haveExtension("EGL_KHR_gl_colorspace"); switch (format) { case HAL_PIXEL_FORMAT_RGBA_8888: + case HAL_PIXEL_FORMAT_RGBX_8888: + // RGB_888 is never returned by getNativePixelFormat, but is included here for completeness. + case HAL_PIXEL_FORMAT_RGB_888: if (haveColorSpaceSupport) { // Spec says: // [fn1] Only OpenGL and OpenGL ES contexts which support sRGB |