summaryrefslogtreecommitdiff
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-02-12 16:08:55 -0800
committer Romain Guy <romainguy@google.com> 2013-02-13 11:27:05 -0800
commit8d4aeb7111afac0c3c7e56d4ad5d92f9cfce2ffd (patch)
treed526296ca8e54842b15b60adaad484ee29feccf2 /libs/hwui/Caches.cpp
parentd1a84242a7ba807310d8f8d389796c7163cb97a0 (diff)
Add a render buffer cache to reuse stencil buffers
Bug #7146141 This new cache is used in a similar way to LayerCache. It helps reuse already allocated stencil buffers and thus avoid churning memory on every frame. Change-Id: I19551d72da52c40039e65904563600e492c8b193
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r--libs/hwui/Caches.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 492bb7d171f5..74201d1fda58 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -186,6 +186,8 @@ void Caches::dumpMemoryUsage(String8 &log) {
textureCache.getSize(), textureCache.getMaxSize());
log.appendFormat(" LayerCache %8d / %8d\n",
layerCache.getSize(), layerCache.getMaxSize());
+ log.appendFormat(" RenderBufferCache %8d / %8d\n",
+ renderBufferCache.getSize(), renderBufferCache.getMaxSize());
log.appendFormat(" GradientCache %8d / %8d\n",
gradientCache.getSize(), gradientCache.getMaxSize());
log.appendFormat(" PathCache %8d / %8d\n",
@@ -215,6 +217,7 @@ void Caches::dumpMemoryUsage(String8 &log) {
uint32_t total = 0;
total += textureCache.getSize();
total += layerCache.getSize();
+ total += renderBufferCache.getSize();
total += gradientCache.getSize();
total += pathCache.getSize();
total += dropShadowCache.getSize();
@@ -298,6 +301,7 @@ void Caches::flush(FlushMode mode) {
// fall through
case kFlushMode_Layers:
layerCache.clear();
+ renderBufferCache.clear();
break;
}