summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/eglApi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/libs/EGL/eglApi.cpp')
-rw-r--r--opengl/libs/EGL/eglApi.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 8378907..0bc81b1 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -466,6 +466,14 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
EGLint format = HAL_PIXEL_FORMAT_RGBA_8888;
android_dataspace dataSpace = HAL_DATASPACE_UNKNOWN;
+#if WORKAROUND_BUG_10194508
+ if (!cnx->egl.eglGetConfigAttrib(iDpy, config, EGL_NATIVE_VISUAL_ID,
+ &format)) {
+ ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x",
+ eglGetError());
+ format = 0;
+ }
+#else
EGLint a = 0;
cnx->egl.eglGetConfigAttrib(iDpy, config, EGL_ALPHA_SIZE, &a);
if (a > 0) {
@@ -484,6 +492,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
format = HAL_PIXEL_FORMAT_RGBX_8888;
}
}
+#endif
// now select a corresponding sRGB format if needed
if (attrib_list && dp->haveExtension("EGL_KHR_gl_colorspace")) {