Move several property queries to Properties class
bug:17478770
This removes a lot of redundant property query code, and puts the
queries all in one place, so defining them automatically will be simpler
in the future.
Change-Id: I0428550e6081f07bc6554ffdf73b22284325abb8
diff --git a/libs/hwui/FboCache.cpp b/libs/hwui/FboCache.cpp
index cca3cb7..b2181b6 100644
--- a/libs/hwui/FboCache.cpp
+++ b/libs/hwui/FboCache.cpp
@@ -27,15 +27,8 @@
// Constructors/destructor
///////////////////////////////////////////////////////////////////////////////
-FboCache::FboCache(): mMaxSize(DEFAULT_FBO_CACHE_SIZE) {
- char property[PROPERTY_VALUE_MAX];
- if (property_get(PROPERTY_FBO_CACHE_SIZE, property, nullptr) > 0) {
- INIT_LOGD(" Setting fbo cache size to %s", property);
- mMaxSize = atoi(property);
- } else {
- INIT_LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE);
- }
-}
+FboCache::FboCache()
+ : mMaxSize(Properties::fboCacheSize) {}
FboCache::~FboCache() {
clear();