Loading opengl/libs/Android.mk +0 −3 Original line number Original line Diff line number Diff line Loading @@ -47,9 +47,6 @@ LOCAL_CFLAGS += -DEGL_TRACE=1 ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION endif endif ifeq ($(TARGET_BOARD_PLATFORM), omap4) LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1 endif ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) endif endif Loading opengl/libs/EGL/eglApi.cpp +2 −30 Original line number Original line Diff line number Diff line Loading @@ -421,35 +421,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, // of our native format. So if sRGB gamma is requested, we have to // of our native format. So if sRGB gamma is requested, we have to // modify the EGLconfig's format before setting the native window's // modify the EGLconfig's format before setting the native window's // format. // 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")) { if (ENABLE_EGL_KHR_GL_COLORSPACE) { format = modifyFormatColorspace(format, *(attr+1)); } else { // Normally we'd pass through unhandled attributes to // the driver. But in case the driver implements this // extension but we're disabling it, we want to prevent // it getting through -- support will be broken without // our help. ALOGE("sRGB window surfaces not supported"); return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE); } } } } #else // by default, just pick RGBA_8888 // by default, just pick RGBA_8888 EGLint format = HAL_PIXEL_FORMAT_RGBA_8888; EGLint format = HAL_PIXEL_FORMAT_RGBA_8888; Loading Loading @@ -490,7 +462,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, } } } } } } #endif if (format != 0) { if (format != 0) { int err = native_window_set_buffers_format(window, format); int err = native_window_set_buffers_format(window, format); if (err != 0) { if (err != 0) { Loading Loading
opengl/libs/Android.mk +0 −3 Original line number Original line Diff line number Diff line Loading @@ -47,9 +47,6 @@ LOCAL_CFLAGS += -DEGL_TRACE=1 ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION endif endif ifeq ($(TARGET_BOARD_PLATFORM), omap4) LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1 endif ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) endif endif Loading
opengl/libs/EGL/eglApi.cpp +2 −30 Original line number Original line Diff line number Diff line Loading @@ -421,35 +421,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, // of our native format. So if sRGB gamma is requested, we have to // of our native format. So if sRGB gamma is requested, we have to // modify the EGLconfig's format before setting the native window's // modify the EGLconfig's format before setting the native window's // format. // 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")) { if (ENABLE_EGL_KHR_GL_COLORSPACE) { format = modifyFormatColorspace(format, *(attr+1)); } else { // Normally we'd pass through unhandled attributes to // the driver. But in case the driver implements this // extension but we're disabling it, we want to prevent // it getting through -- support will be broken without // our help. ALOGE("sRGB window surfaces not supported"); return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE); } } } } #else // by default, just pick RGBA_8888 // by default, just pick RGBA_8888 EGLint format = HAL_PIXEL_FORMAT_RGBA_8888; EGLint format = HAL_PIXEL_FORMAT_RGBA_8888; Loading Loading @@ -490,7 +462,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, } } } } } } #endif if (format != 0) { if (format != 0) { int err = native_window_set_buffers_format(window, format); int err = native_window_set_buffers_format(window, format); if (err != 0) { if (err != 0) { Loading