void TextureCache::init() { mCache.setOnEntryRemovedListener(this); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); mDebugEnabled = readDebugLevel() & kDebugCaches; }
Caches::Caches(): Singleton<Caches>(), mInitialized(false) { init(); initFont(); initExtensions(); initConstraints(); initProperties(); mDebugLevel = readDebugLevel(); ALOGD("Enabling debug mode %d", mDebugLevel); }
TessellationCache::TessellationCache() : mSize(0) , mMaxSize(MB(DEFAULT_VERTEX_CACHE_SIZE)) , mCache(LruCache<Description, Buffer*>::kUnlimitedCapacity) , mShadowCache(LruCache<ShadowDescription, Task<vertexBuffer_pair_t*>*>::kUnlimitedCapacity) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_VERTEX_CACHE_SIZE, property, NULL) > 0) { INIT_LOGD(" Setting %s cache size to %sMB", name, property); setMaxSize(MB(atof(property))); } else { INIT_LOGD(" Using default %s cache size of %.2fMB", name, DEFAULT_VERTEX_CACHE_SIZE); } mCache.setOnEntryRemovedListener(&mBufferRemovedListener); mShadowCache.setOnEntryRemovedListener(&mBufferPairRemovedListener); mDebugEnabled = readDebugLevel() & kDebugCaches; }
Caches::Caches(): Singleton<Caches>(), mInitialized(false) { GLint maxTextureUnits; glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits); if (maxTextureUnits < REQUIRED_TEXTURE_UNITS_COUNT) { LOGW("At least %d texture units are required!", REQUIRED_TEXTURE_UNITS_COUNT); } glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); init(); mDebugLevel = readDebugLevel(); LOGD("Enabling debug mode %d", mDebugLevel); #if RENDER_LAYERS_AS_REGIONS INIT_LOGD("Layers will be composited as regions"); #endif }
PathCache::PathCache(): mCache(LruCache<PathDescription, PathTexture*>::kUnlimitedCapacity), mSize(0), mMaxSize(MB(DEFAULT_PATH_CACHE_SIZE)) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_PATH_CACHE_SIZE, property, NULL) > 0) { INIT_LOGD(" Setting %s cache size to %sMB", name, property); setMaxSize(MB(atof(property))); } else { INIT_LOGD(" Using default %s cache size of %.2fMB", name, DEFAULT_PATH_CACHE_SIZE); } mCache.setOnEntryRemovedListener(this); GLint maxTextureSize; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); mMaxTextureSize = maxTextureSize; mDebugEnabled = readDebugLevel() & kDebugCaches; }
void TextDropShadowCache::init() { mCache.setOnEntryRemovedListener(this); mDebugEnabled = readDebugLevel() & kDebugMoreCaches; }