Yet more GrThreadSafeUniquelyKeyedProxyViewCache purging tests
This CL also renames dropAllUniqueRefs
Bug: 1108408
Change-Id: Ic39ccfc5efafd60d53524562dd308102fb134d94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318737
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp b/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp
index 56748f4..3c253d1 100644
--- a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp
+++ b/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp
@@ -42,7 +42,8 @@
// TODO: should we empty out the fFreeEntryList and reset fEntryAllocator?
}
-void GrThreadSafeUniquelyKeyedProxyViewCache::dropAllUniqueRefs(GrResourceCache* resourceCache) {
+// TODO: add an atomic flag so we know when it is worthwhile to iterate
+void GrThreadSafeUniquelyKeyedProxyViewCache::dropUniqueRefs(GrResourceCache* resourceCache) {
SkAutoSpinlock lock{fSpinLock};
// Iterate from LRU to MRU