Commit Graph

5 Commits

Author SHA1 Message Date
Mathias Agopian 002e1e58df libutils clean-up
Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
2013-05-07 18:28:11 -07:00
Romain Guy f1951df8a1 Add LruCache::Iterator
Required by libhwui

Change-Id: I164b9a4a82d89d132da01a56535c0df084de86f7
2012-11-28 18:26:54 -08:00
Romain Guy e402f1fde2 Add another ifndef and a couple of methods to LruCache
The new methods on LruCache are needed by libhwui to manage
the cache of paths.

Change-Id: If54fa325c54e2b04e7fe5dfe6dad66066c40127c
2012-11-28 17:37:03 -08:00
Romain Guy 98fc88d3ce Add #ifndef to prevent multiple definitions
Change-Id: Ib861eee0f333fe29290437b7e67623622d8dabd0
2012-11-28 12:59:40 -08:00
Raph Levien 8185e47822 Add an LRU cache plus hashing primitives
This patch adds a hashtable-based LRU cache. This should be
significantly higher performance than the GenerationCache it is intended
to replace. It is a large part of the fix for bug 7271109
TextLayoutCache low-level performance issues.

We added a new method to BasicHashtable to detect when rehashing is
needed, because the internal linked list pointers would get invalidated
by that rehashing.

Also, the hash_type specialized to pointers had a small flaw.

Change-Id: I950c2083f96519777b851dbe157100e0a334caec
2012-10-26 16:09:22 -07:00