Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b1b7c64 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Remove the right entries from the cache when a GC happens."

parents 50fc0e5c 7b8b7589
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
}