Fix bug in GrResourceCache::purgeAsNeeded

Change-Id: Iafb09c2f7ea2393c2753208bd0d245c7b175bc65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422957
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 2a96973..d9a9363 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -553,6 +553,7 @@
     if (stillOverbudget) {
         fThreadSafeCache->dropUniqueRefs(this);
 
+        stillOverbudget = this->overBudget();
         while (stillOverbudget && fPurgeableQueue.count()) {
             GrGpuResource* resource = fPurgeableQueue.peek();
             SkASSERT(resource->resourcePriv().isPurgeable());