diff options
Diffstat (limited to 'libs/hwui/PathCache.cpp')
| -rw-r--r-- | libs/hwui/PathCache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 0f22bea48009..367c6275c711 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -44,7 +44,9 @@ void PathCache::remove(SkPath* path) { mCache.setOnEntryRemovedListener(NULL); for (size_t i = 0; i < pathsToRemove.size(); i++) { - mCache.removeAt(pathsToRemove.itemAt(i)); + // This will work because pathsToRemove is sorted + // and because the cache is a sorted keyed vector + mCache.removeAt(pathsToRemove.itemAt(i) - i); } mCache.setOnEntryRemovedListener(this); } |