summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r--libs/hwui/Caches.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 248e054..40dd117 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -19,6 +19,7 @@
#include <utils/Log.h>
#include "Caches.h"
+#include "Properties.h"
namespace android {
@@ -49,6 +50,9 @@ Caches::Caches(): Singleton<Caches>(), blend(false), lastSrcMode(GL_ZERO),
mCurrentBuffer = meshBuffer;
mRegionMesh = NULL;
+
+ mDebugLevel = readDebugLevel();
+ LOGD("Enabling debug mode %d", mDebugLevel);
}
Caches::~Caches() {
@@ -91,6 +95,16 @@ void Caches::dumpMemoryUsage() {
}
///////////////////////////////////////////////////////////////////////////////
+// Memory management
+///////////////////////////////////////////////////////////////////////////////
+
+void Caches::clearGarbage() {
+ textureCache.clearGarbage();
+ gradientCache.clearGarbage();
+ pathCache.clearGarbage();
+}
+
+///////////////////////////////////////////////////////////////////////////////
// VBO
///////////////////////////////////////////////////////////////////////////////