diff options
author | Ethan Chen <intervigil@gmail.com> | 2015-10-15 13:50:10 -0700 |
---|---|---|
committer | Michael Gernoth <michael@gernoth.net> | 2015-10-16 20:20:32 +0200 |
commit | bcce313feab557ab7cbb06cc1de941a7bf6657b0 (patch) | |
tree | 76b89c33385bf45def9a2f6646cfb2c77c81711e /opengl | |
parent | e3fc10fbb7bba6e92205c2758743482c6bdeeb00 (diff) | |
download | frameworks_native-bcce313feab557ab7cbb06cc1de941a7bf6657b0.zip frameworks_native-bcce313feab557ab7cbb06cc1de941a7bf6657b0.tar.gz frameworks_native-bcce313feab557ab7cbb06cc1de941a7bf6657b0.tar.bz2 |
Revert "egl: Remove old tuna BGRA vs RGBA workaround."
This reverts commit 733a80754786d39cdc0fee09509b194472c320bc.
Change-Id: Ifb41720ed020489892a667914ea3bd3f1ac6504e
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/Android.mk | 3 | ||||
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index 18ad300..661b99c 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -47,6 +47,9 @@ LOCAL_CFLAGS += -DEGL_TRACE=1 ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION endif +ifeq ($(TARGET_BOARD_PLATFORM), omap4) + LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1 +endif ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) endif 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")) { |