Increase testing of GrThreadSafeUniquelyKeyedProxyViewCache wrt GrResourceCache purging
Bug: 1108408
Change-Id: I2d6f89ce71b8d94be22b1ff38b9e205df94ca765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318205
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index fcdd8d9..7c5a640 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -530,7 +530,7 @@
}
if (stillOverbudget) {
- fThreadSafeViewCache->dropAllUniqueRefs(); // Is there a less nuclear option?
+ fThreadSafeViewCache->dropAllUniqueRefs(this);
while (stillOverbudget && fPurgeableQueue.count()) {
GrGpuResource* resource = fPurgeableQueue.peek();
@@ -546,7 +546,7 @@
void GrResourceCache::purgeUnlockedResources(bool scratchResourcesOnly) {
// In the scratch-only mode we could just drop the ones that are uniquely held and would
// be converted to scratch textures
- fThreadSafeViewCache->dropAllUniqueRefs();
+ fThreadSafeViewCache->dropAllUniqueRefs(nullptr);
if (!scratchResourcesOnly) {
// We could disable maintaining the heap property here, but it would add a lot of