summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2016-02-06 01:39:34 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-02-06 01:39:34 +0000
commit807842acfacbc12a6ef0234e20ef3f91e669c06f (patch)
treea7dd12556c57405bc5129c917db91ef6f82d67c9 /libs/hwui/PathCache.cpp
parent2068bb8bb06303997697ecaaa2e7063835a972b6 (diff)
parent48a8f431fa52ae2ee25ffba9d20676f03bb710ff (diff)
Merge "Move several property queries to Properties class"
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index bfabc1d4d94c..8f914acc5c76 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -135,17 +135,10 @@ static void drawPath(const SkPath *path, const SkPaint* paint, SkBitmap& bitmap,
// Cache constructor/destructor
///////////////////////////////////////////////////////////////////////////////
-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, nullptr) > 0) {
- INIT_LOGD(" Setting path cache size to %sMB", property);
- mMaxSize = MB(atof(property));
- } else {
- INIT_LOGD(" Using default path cache size of %.2fMB", DEFAULT_PATH_CACHE_SIZE);
- }
-
+PathCache::PathCache()
+ : mCache(LruCache<PathDescription, PathTexture*>::kUnlimitedCapacity)
+ , mSize(0)
+ , mMaxSize(Properties::pathCacheSize) {
mCache.setOnEntryRemovedListener(this);
GLint maxTextureSize;