ccpr: Visit atlas proxies during visitProxies()

Also makes sure to flag _cached_ atlas textures as ignored by the
resource allocator.

Bug: skia:
Change-Id: I30d4af1832798bc325fd082143755cf84d40515a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215140
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ccpr/GrCCPathCache.cpp b/src/gpu/ccpr/GrCCPathCache.cpp
index 3bc26c9..08eda25 100644
--- a/src/gpu/ccpr/GrCCPathCache.cpp
+++ b/src/gpu/ccpr/GrCCPathCache.cpp
@@ -226,12 +226,14 @@
         ++entry->fHitCount;
 
         if (entry->fCachedAtlas) {
-            SkASSERT(SkToBool(entry->fCachedAtlas->peekOnFlushRefCnt())
-                             == SkToBool(entry->fCachedAtlas->getOnFlushProxy()));
+            SkASSERT(SkToBool(entry->fCachedAtlas->peekOnFlushRefCnt()) ==
+                     SkToBool(entry->fCachedAtlas->getOnFlushProxy()));
             if (!entry->fCachedAtlas->getOnFlushProxy()) {
-                entry->fCachedAtlas->setOnFlushProxy(
-                    onFlushRP->findOrCreateProxyByUniqueKey(entry->fCachedAtlas->textureKey(),
-                                                            GrCCAtlas::kTextureOrigin));
+                if (sk_sp<GrTextureProxy> onFlushProxy = onFlushRP->findOrCreateProxyByUniqueKey(
+                        entry->fCachedAtlas->textureKey(), GrCCAtlas::kTextureOrigin)) {
+                    onFlushProxy->priv().setIgnoredByResourceAllocator();
+                    entry->fCachedAtlas->setOnFlushProxy(std::move(onFlushProxy));
+                }
             }
             if (!entry->fCachedAtlas->getOnFlushProxy()) {
                 // Our atlas's backing texture got purged from the GrResourceCache. Release the