summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-11-11 16:42:34 -0800
committer Chris Craik <ccraik@google.com> 2015-11-12 13:05:35 -0800
commit9fded232a9548a304e0145011df8849fba0dcda7 (patch)
treeffe48b03342817dd2681825498ecdf3799e01a0d /libs/hwui/LayerCache.cpp
parent8b8be50c640a13b98d364b3f36962d9cf185d6d9 (diff)
Recycle OffscreenBuffers
Change-Id: Ia2e219026f211a5308ecf8209c5f986bb888aadd
Diffstat (limited to 'libs/hwui/LayerCache.cpp')
-rw-r--r--libs/hwui/LayerCache.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index 39cadd198c83..b117754347ed 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -14,14 +14,15 @@
* limitations under the License.
*/
-#include <GLES2/gl2.h>
-
-#include <utils/Log.h>
+#include "LayerCache.h"
#include "Caches.h"
-#include "LayerCache.h"
#include "Properties.h"
+#include <utils/Log.h>
+
+#include <GLES2/gl2.h>
+
namespace android {
namespace uirenderer {
@@ -29,15 +30,9 @@ namespace uirenderer {
// Constructors/destructor
///////////////////////////////////////////////////////////////////////////////
-LayerCache::LayerCache(): mSize(0), mMaxSize(MB(DEFAULT_LAYER_CACHE_SIZE)) {
- char property[PROPERTY_VALUE_MAX];
- if (property_get(PROPERTY_LAYER_CACHE_SIZE, property, nullptr) > 0) {
- INIT_LOGD(" Setting layer cache size to %sMB", property);
- setMaxSize(MB(atof(property)));
- } else {
- INIT_LOGD(" Using default layer cache size of %.2fMB", DEFAULT_LAYER_CACHE_SIZE);
- }
-}
+LayerCache::LayerCache()
+ : mSize(0)
+ , mMaxSize(Properties::layerPoolSize) {}
LayerCache::~LayerCache() {
clear();