diff options
author | Jamie Gennis <jgennis@google.com> | 2011-11-21 21:08:23 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-21 21:08:23 -0800 |
commit | 08b7660f67277db234f24a6e9cb0be172e81558d (patch) | |
tree | bb6d259ddca8bc8d155ee4cb1fca2701e21e2156 /opengl | |
parent | 07f062b6271e7ec820d1079566e7451a9cf55558 (diff) | |
parent | 8b8c321c70687ace750e42b745b6e96258d739cd (diff) | |
download | frameworks_base-08b7660f67277db234f24a6e9cb0be172e81558d.zip frameworks_base-08b7660f67277db234f24a6e9cb0be172e81558d.tar.gz frameworks_base-08b7660f67277db234f24a6e9cb0be172e81558d.tar.bz2 |
am 8b8c321c: am b8d20d02: Merge "EGL: Use cache sizes defined in the BoardConfig" into ics-mr1
* commit '8b8c321c70687ace750e42b745b6e96258d739cd':
EGL: Use cache sizes defined in the BoardConfig
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/Android.mk | 9 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_cache.cpp | 12 |
2 files changed, 18 insertions, 3 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index 5855b63..9c1a10e 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -44,10 +44,17 @@ ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER endif +ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) + LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) +endif + +ifneq ($(MAX_EGL_CACHE_SIZE),) + LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) +endif + include $(BUILD_SHARED_LIBRARY) installed_libEGL := $(LOCAL_INSTALLED_MODULE) - # OpenGL drivers config file ifneq ($(BOARD_EGL_CFG),) diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index fe32d43..c4a7466 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -25,10 +25,18 @@ #include <sys/types.h> #include <unistd.h> +#ifndef MAX_EGL_CACHE_ENTRY_SIZE +#define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024); +#endif + +#ifndef MAX_EGL_CACHE_SIZE +#define MAX_EGL_CACHE_SIZE (64 * 1024); +#endif + // Cache size limits. static const size_t maxKeySize = 1024; -static const size_t maxValueSize = 4096; -static const size_t maxTotalSize = 64 * 1024; +static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE; +static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE; // Cache file header static const char* cacheFileMagic = "EGL$"; |