From 5f0c6a483900f3989f4d2a8f913cf5b6a9777d03 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 7 Jul 2010 13:06:26 -0700 Subject: Optimize FBO cache. This change introduces a new generational cache called GenerationMultiCache that can store several values with the same key. This can be used to use multiple layers of the same size at the same time, without recreating them over and over again. Change-Id: I425466a20908b862c5f464a0f9e582ec18cbd7ac --- libs/hwui/LayerCache.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libs/hwui/LayerCache.cpp') diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index 0d3214dcbfa3..7d85e7b37c8c 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -28,13 +28,12 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// LayerCache::LayerCache(uint32_t maxByteSize): - mCache(GenerationCache::kUnlimitedCapacity), + mCache(GenerationMultiCache::kUnlimitedCapacity), mSize(0), mMaxSize(maxByteSize) { } LayerCache::~LayerCache() { - mCache.setOnEntryRemovedListener(this); - mCache.clear(); + clear(); } /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3-59-g8ed1b