EGL: make max cache key size BoardConfig-able
This change makes the maximum EGL blob cache key size configurable via a BoardConfig. Change-Id: Ic669cd25fc743662bd4f13aab62354fc3d54560c
This commit is contained in:
parent
a0931d6575
commit
f478e6d18c
|
@ -57,6 +57,10 @@ ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
|
|||
LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
|
||||
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),)
|
||||
LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
|
||||
endif
|
||||
|
|
|
@ -29,12 +29,16 @@
|
|||
#define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024);
|
||||
#endif
|
||||
|
||||
#ifndef MAX_EGL_CACHE_KEY_SIZE
|
||||
#define MAX_EGL_CACHE_KEY_SIZE (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 maxKeySize = MAX_EGL_CACHE_KEY_SIZE;
|
||||
static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE;
|
||||
static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue