diff options
author | 2010-07-07 13:06:26 -0700 | |
---|---|---|
committer | 2010-07-07 13:06:26 -0700 | |
commit | 5f0c6a483900f3989f4d2a8f913cf5b6a9777d03 (patch) | |
tree | cd0898b027dab942753874a070c403ca9b88e4aa /libs/hwui/LayerCache.cpp | |
parent | c832baa107f36740e462c83e7525ba2e9f01f086 (diff) |
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
Diffstat (limited to 'libs/hwui/LayerCache.cpp')
-rw-r--r-- | libs/hwui/LayerCache.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<LayerSize, Layer*>::kUnlimitedCapacity), + mCache(GenerationMultiCache<LayerSize, Layer*>::kUnlimitedCapacity), mSize(0), mMaxSize(maxByteSize) { } LayerCache::~LayerCache() { - mCache.setOnEntryRemovedListener(this); - mCache.clear(); + clear(); } /////////////////////////////////////////////////////////////////////////////// |