diff options
author | 2011-11-11 15:40:13 -0800 | |
---|---|---|
committer | 2011-11-11 22:14:07 -0800 | |
commit | d9e688cab3015d858110fb8240cf7378c6befd82 (patch) | |
tree | 806f5e09090a6cf467666009a165e5f63155ae2f /libs/hwui/PathCache.cpp | |
parent | e3571f633a825738d785b587e91798a3d0876740 (diff) |
Clean up GenerationCache.
Use const references to keys and values where appropriate to avoid
copying them unnecessarily.
Deleted some dead code.
Simplified a few pieces that were doing unnecessary redundant work.
Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r-- | libs/hwui/PathCache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 367c6275c711..e893f7a95adb 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -34,8 +34,8 @@ PathCache::PathCache(): ShapeCache<PathCacheEntry>("path", void PathCache::remove(SkPath* path) { // TODO: Linear search... - Vector<uint32_t> pathsToRemove; - for (uint32_t i = 0; i < mCache.size(); i++) { + Vector<size_t> pathsToRemove; + for (size_t i = 0; i < mCache.size(); i++) { if (mCache.getKeyAt(i).path == path) { pathsToRemove.push(i); removeTexture(mCache.getValueAt(i)); |