summaryrefslogtreecommitdiffstats
path: root/opengl/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-08-28 15:22:29 -0700
committerMathias Agopian <mathias@google.com>2013-08-28 15:22:29 -0700
commitf4486c6ea4bcb728ee0f38df7a8ec75c389d9d2e (patch)
tree7be3ea54fd00b0cf4c9700e1ff9582fb36179008 /opengl/libs
parentf2e4fcd96c11861bd0af1a9525344c1b691c9de9 (diff)
downloadframeworks_native-f4486c6ea4bcb728ee0f38df7a8ec75c389d9d2e.zip
frameworks_native-f4486c6ea4bcb728ee0f38df7a8ec75c389d9d2e.tar.gz
frameworks_native-f4486c6ea4bcb728ee0f38df7a8ec75c389d9d2e.tar.bz2
try to keep omap4 alive
Bug: 10527646 Change-Id: Iec572a910e932115cf4f2e1215142b10cd91bd6f
Diffstat (limited to 'opengl/libs')
-rw-r--r--opengl/libs/Android.mk7
-rw-r--r--opengl/libs/EGL/Loader.cpp29
-rw-r--r--opengl/libs/EGL/eglApi.cpp21
3 files changed, 22 insertions, 35 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index b4756dd..eb263d3 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -52,12 +52,9 @@ endif
ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
LOCAL_CFLAGS += -DADRENO130=1
endif
-
-ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
- # see Loader.cpp for details
- LOCAL_CFLAGS += -DSYSTEMUI_PBSIZE_HACK=1
+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/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index beaa560..02914a0 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -374,35 +374,6 @@ void *Loader::load_driver(const char* kind,
ALOGE_IF(!getProcAddress,
"can't find eglGetProcAddress() in %s", driver_absolute_path);
-#ifdef SYSTEMUI_PBSIZE_HACK
-#warning "SYSTEMUI_PBSIZE_HACK enabled"
- /*
- * TODO: replace SYSTEMUI_PBSIZE_HACK by something less hackish
- *
- * Here we adjust the PB size from its default value to 512KB which
- * is the minimum acceptable for the systemui process.
- * We do this on low-end devices only because it allows us to enable
- * h/w acceleration in the systemui process while keeping the
- * memory usage down.
- *
- * Obviously, this is the wrong place and wrong way to make this
- * adjustment, but at the time of this writing this was the safest
- * solution.
- */
- const char *cmdline = getProcessCmdline();
- if (strstr(cmdline, "systemui")) {
- void *imgegl = dlopen("/vendor/lib/libIMGegl.so", RTLD_LAZY);
- if (imgegl) {
- unsigned int *PVRDefaultPBS =
- (unsigned int *)dlsym(imgegl, "PVRDefaultPBS");
- if (PVRDefaultPBS) {
- ALOGD("setting default PBS to 512KB, was %d KB", *PVRDefaultPBS / 1024);
- *PVRDefaultPBS = 512*1024;
- }
- }
- }
-#endif
-
egl_t* egl = &cnx->egl;
__eglMustCastToProperFunctionPointerType* curr =
(__eglMustCastToProperFunctionPointerType*)egl;
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 7410c12..9d792fb 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -413,7 +413,25 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
// of our native format. So if sRGB gamma is requested, we have to
// modify the EGLconfig's format before setting the native window's
// format.
-
+#if WORKAROUND_BUG_10194508
+#warning "WORKAROUND_10194508 enabled"
+ EGLint format;
+ if (!cnx->egl.eglGetConfigAttrib(iDpy, config, EGL_NATIVE_VISUAL_ID,
+ &format)) {
+ ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x",
+ eglGetError());
+ format = 0;
+ }
+ if (attrib_list) {
+ for (const EGLint* attr = attrib_list; *attr != EGL_NONE;
+ attr += 2) {
+ if (*attr == EGL_GL_COLORSPACE_KHR &&
+ dp->haveExtension("EGL_KHR_gl_colorspace")) {
+ format = modifyFormatColorspace(format, *(attr+1));
+ }
+ }
+ }
+#else
// by default, just pick RGBA_8888
EGLint format = HAL_PIXEL_FORMAT_RGBA_8888;
@@ -444,6 +462,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
}
}
}
+#endif
if (format != 0) {
int err = native_window_set_buffers_format(window, format);
if (err != 0) {