am 688115bb: am e45b01f5: Merge "EGL: make max cache key size BoardConfig-able" into jb-mr1-dev

* commit '688115bbd75416d0c665e8a922223bbf8742edc0':
  EGL: make max cache key size BoardConfig-able
This commit is contained in:
Jamie Gennis 2012-09-13 03:21:40 -07:00 committed by Android Git Automerger
commit 29821a3010
2 changed files with 9 additions and 1 deletions

View File

@ -57,6 +57,10 @@ 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
ifneq ($(MAX_EGL_CACHE_KEY_SIZE),)
LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE)
endif
ifneq ($(MAX_EGL_CACHE_SIZE),) ifneq ($(MAX_EGL_CACHE_SIZE),)
LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
endif endif

View File

@ -29,12 +29,16 @@
#define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024); #define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024);
#endif #endif
#ifndef MAX_EGL_CACHE_KEY_SIZE
#define MAX_EGL_CACHE_KEY_SIZE (1024);
#endif
#ifndef MAX_EGL_CACHE_SIZE #ifndef MAX_EGL_CACHE_SIZE
#define MAX_EGL_CACHE_SIZE (64 * 1024); #define MAX_EGL_CACHE_SIZE (64 * 1024);
#endif #endif
// Cache size limits. // Cache size limits.
static const size_t maxKeySize = 1024; static const size_t maxKeySize = MAX_EGL_CACHE_KEY_SIZE;
static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE; static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE;
static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE; static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE;