Rename GrThreadSafeUniquelyKeyedProxyViewCache

Once triangulated paths are added this will no longer just be storing proxy views.

Bug: 1108408
Change-Id: I82fa47b0b85f738d9a25330c29bc2892c9bfeda4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index f31791a..3343363 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -20,7 +20,7 @@
 #include "src/gpu/GrSoftwarePathRenderer.h"
 #include "src/gpu/GrStyle.h"
 #include "src/gpu/GrTextureProxy.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 #include "src/gpu/geometry/GrStyledShape.h"
 
@@ -126,13 +126,13 @@
     SkASSERT(filter);
     SkASSERT(!shape.style().applies());
 
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
     GrSurfaceProxyView filteredMaskView;
     sk_sp<SkData> data;
 
     if (key->isValid()) {
-        std::tie(filteredMaskView, data) = threadSafeViewCache->findWithData(*key);
+        std::tie(filteredMaskView, data) = threadSafeCache->findWithData(*key);
     }
 
     if (filteredMaskView) {
@@ -196,8 +196,7 @@
 
         if (key->isValid()) {
             key->setCustomData(create_data(*drawRect, unclippedDevShapeBounds));
-            std::tie(filteredMaskView, data) = threadSafeViewCache->addWithData(*key,
-                                                                                filteredMaskView);
+            std::tie(filteredMaskView, data) = threadSafeCache->addWithData(*key, filteredMaskView);
             // If we got a different view back from 'addWithData' it could have a different drawRect
             *drawRect = extract_draw_rect_from_data(data.get(), unclippedDevShapeBounds);
         }
@@ -400,15 +399,15 @@
         return {};
     }
 
-    auto threadSafeViewCache = dContext->priv().threadSafeViewCache();
+    auto threadSafeCache = dContext->priv().threadSafeCache();
 
     GrSurfaceProxyView lazyView;
-    sk_sp<GrThreadSafeUniquelyKeyedProxyViewCache::Trampoline> trampoline;
+    sk_sp<GrThreadSafeCache::Trampoline> trampoline;
 
     if (key->isValid()) {
         // In this case, we want GPU-filtered masks to have priority over SW-generated ones so
         // we pre-emptively add a lazy-view to the cache and fill it in later.
-        std::tie(lazyView, trampoline) = GrThreadSafeUniquelyKeyedProxyViewCache::CreateLazyView(
+        std::tie(lazyView, trampoline) = GrThreadSafeCache::CreateLazyView(
                 dContext, GrColorType::kAlpha_8, maskRect->size(),
                 kMaskOrigin, SkBackingFit::kApprox);
         if (!lazyView) {
@@ -416,7 +415,7 @@
         }
 
         key->setCustomData(create_data(*maskRect, unclippedDevShapeBounds));
-        auto [cachedView, data] = threadSafeViewCache->findOrAddWithData(*key, lazyView);
+        auto [cachedView, data] = threadSafeCache->findOrAddWithData(*key, lazyView);
         if (cachedView != lazyView) {
             // In this case, the gpu-thread lost out to a recording thread - use its result.
             SkASSERT(data);
@@ -440,7 +439,7 @@
             // succeeded but, if it does, remove the lazy-view from the cache and fallback to
             // a SW-created mask. Note that any recording threads that glommed onto the
             // lazy-view will have to, later, drop those draws.
-            threadSafeViewCache->remove(*key);
+            threadSafeCache->remove(*key);
         }
         return {};
     }
@@ -456,7 +455,7 @@
             // Remove the lazy-view from the cache and fallback to a SW-created mask. Note that
             // any recording threads that glommed onto the lazy-view will have to, later, drop
             // those draws.
-            threadSafeViewCache->remove(*key);
+            threadSafeCache->remove(*key);
         }
         return {};
     }
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index f0b07e6..91f328f 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -27,7 +27,7 @@
 #include "src/gpu/GrSemaphore.h"
 #include "src/gpu/GrShaderUtils.h"
 #include "src/gpu/GrSoftwarePathRenderer.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/GrTracing.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/ccpr/GrCoverageCountingPathRenderer.h"
@@ -74,7 +74,7 @@
     }
 
     SkASSERT(this->getTextBlobCache());
-    SkASSERT(this->threadSafeViewCache());
+    SkASSERT(this->threadSafeCache());
 
     if (fGpu) {
         fStrikeCache = std::make_unique<GrStrikeCache>();
@@ -85,7 +85,7 @@
 
     if (fResourceCache) {
         fResourceCache->setProxyProvider(this->proxyProvider());
-        fResourceCache->setThreadSafeViewCache(this->threadSafeViewCache());
+        fResourceCache->setThreadSafeCache(this->threadSafeCache());
     }
 
     fDidTestPMConversions = false;
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h
index 3ac7be2..2823a1d 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -58,9 +58,7 @@
     GrStrikeCache* getGrStrikeCache() { return fContext->fStrikeCache.get(); }
     GrTextBlobCache* getTextBlobCache() { return fContext->getTextBlobCache(); }
 
-    GrThreadSafeUniquelyKeyedProxyViewCache* threadSafeViewCache() {
-        return fContext->threadSafeViewCache();
-    }
+    GrThreadSafeCache* threadSafeCache() { return fContext->threadSafeCache(); }
 
     /**
      * Registers an object for flush-related callbacks. (See GrOnFlushCallbackObject.)
diff --git a/src/gpu/GrContextThreadSafeProxy.cpp b/src/gpu/GrContextThreadSafeProxy.cpp
index 5ebb306..120699f 100644
--- a/src/gpu/GrContextThreadSafeProxy.cpp
+++ b/src/gpu/GrContextThreadSafeProxy.cpp
@@ -13,7 +13,7 @@
 #include "include/core/SkSurfaceCharacterization.h"
 #include "src/gpu/GrBaseContextPriv.h"
 #include "src/gpu/GrCaps.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrSkSLFP.h"
 #include "src/image/SkSurface_Gpu.h"
 
@@ -40,7 +40,7 @@
 void GrContextThreadSafeProxy::init(sk_sp<const GrCaps> caps) {
     fCaps = std::move(caps);
     fTextBlobCache = std::make_unique<GrTextBlobCache>(fContextID);
-    fThreadSafeViewCache = std::make_unique<GrThreadSafeUniquelyKeyedProxyViewCache>();
+    fThreadSafeCache = std::make_unique<GrThreadSafeCache>();
 }
 
 SkSurfaceCharacterization GrContextThreadSafeProxy::createCharacterization(
diff --git a/src/gpu/GrContextThreadSafeProxyPriv.h b/src/gpu/GrContextThreadSafeProxyPriv.h
index 2a31f68..606aa16 100644
--- a/src/gpu/GrContextThreadSafeProxyPriv.h
+++ b/src/gpu/GrContextThreadSafeProxyPriv.h
@@ -39,12 +39,8 @@
     GrTextBlobCache* getTextBlobCache() { return fProxy->fTextBlobCache.get(); }
     const GrTextBlobCache* getTextBlobCache() const { return fProxy->fTextBlobCache.get(); }
 
-    GrThreadSafeUniquelyKeyedProxyViewCache* threadSafeViewCache() {
-        return fProxy->fThreadSafeViewCache.get();
-    }
-    const GrThreadSafeUniquelyKeyedProxyViewCache* threadSafeViewCache() const {
-        return fProxy->fThreadSafeViewCache.get();
-    }
+    GrThreadSafeCache* threadSafeCache() { return fProxy->fThreadSafeCache.get(); }
+    const GrThreadSafeCache* threadSafeCache() const { return fProxy->fThreadSafeCache.get(); }
 
     void abandonContext() { fProxy->abandonContext(); }
     bool abandoned() const { return fProxy->abandoned(); }
diff --git a/src/gpu/GrRecordingContext.cpp b/src/gpu/GrRecordingContext.cpp
index 26fa0f2..7e49922 100644
--- a/src/gpu/GrRecordingContext.cpp
+++ b/src/gpu/GrRecordingContext.cpp
@@ -131,12 +131,12 @@
     return fThreadSafeProxy->priv().getTextBlobCache();
 }
 
-GrThreadSafeUniquelyKeyedProxyViewCache* GrRecordingContext::threadSafeViewCache() {
-    return fThreadSafeProxy->priv().threadSafeViewCache();
+GrThreadSafeCache* GrRecordingContext::threadSafeCache() {
+    return fThreadSafeProxy->priv().threadSafeCache();
 }
 
-const GrThreadSafeUniquelyKeyedProxyViewCache* GrRecordingContext::threadSafeViewCache() const {
-    return fThreadSafeProxy->priv().threadSafeViewCache();
+const GrThreadSafeCache* GrRecordingContext::threadSafeCache() const {
+    return fThreadSafeProxy->priv().threadSafeCache();
 }
 
 void GrRecordingContext::addOnFlushCallbackObject(GrOnFlushCallbackObject* onFlushCBObject) {
diff --git a/src/gpu/GrRecordingContextPriv.h b/src/gpu/GrRecordingContextPriv.h
index 0deee47..3f6fb33 100644
--- a/src/gpu/GrRecordingContextPriv.h
+++ b/src/gpu/GrRecordingContextPriv.h
@@ -57,9 +57,7 @@
 
     GrTextBlobCache* getTextBlobCache() { return fContext->getTextBlobCache(); }
 
-    GrThreadSafeUniquelyKeyedProxyViewCache* threadSafeViewCache() {
-        return fContext->threadSafeViewCache();
-    }
+    GrThreadSafeCache* threadSafeCache() { return fContext->threadSafeCache(); }
 
     void moveRenderTasksToDDL(SkDeferredDisplayList*);
 
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 5a0910e..f6378db 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -21,7 +21,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxyCacheAccess.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/GrTracing.h"
 #include "src/gpu/SkGr.h"
 
@@ -201,7 +201,7 @@
 void GrResourceCache::abandonAll() {
     AutoValidate av(this);
 
-    fThreadSafeViewCache->dropAllRefs();
+    fThreadSafeCache->dropAllRefs();
 
     // We need to make sure to free any resources that were waiting on a free message but never
     // received one.
@@ -233,7 +233,7 @@
 void GrResourceCache::releaseAll() {
     AutoValidate av(this);
 
-    fThreadSafeViewCache->dropAllRefs();
+    fThreadSafeCache->dropAllRefs();
 
     this->processFreedGpuResources();
 
@@ -242,7 +242,7 @@
     fTexturesAwaitingUnref.reset();
 
     SkASSERT(fProxyProvider); // better have called setProxyProvider
-    SkASSERT(fThreadSafeViewCache); // better have called setThreadSafeViewCache too
+    SkASSERT(fThreadSafeCache); // better have called setThreadSafeCache too
 
     // We must remove the uniqueKeys from the proxies here. While they possess a uniqueKey
     // they also have a raw pointer back to this class (which is presumably going away)!
@@ -530,7 +530,7 @@
     }
 
     if (stillOverbudget) {
-        fThreadSafeViewCache->dropUniqueRefs(this);
+        fThreadSafeCache->dropUniqueRefs(this);
 
         while (stillOverbudget && fPurgeableQueue.count()) {
             GrGpuResource* resource = fPurgeableQueue.peek();
@@ -546,7 +546,7 @@
 void GrResourceCache::purgeUnlockedResources(bool scratchResourcesOnly) {
 
     if (!scratchResourcesOnly) {
-        fThreadSafeViewCache->dropUniqueRefs(nullptr);
+        fThreadSafeCache->dropUniqueRefs(nullptr);
 
         // We could disable maintaining the heap property here, but it would add a lot of
         // complexity. Moreover, this is rarely called.
@@ -580,7 +580,7 @@
 }
 
 void GrResourceCache::purgeResourcesNotUsedSince(GrStdSteadyClock::time_point purgeTime) {
-    fThreadSafeViewCache->dropUniqueRefsOlderThan(purgeTime);
+    fThreadSafeCache->dropUniqueRefsOlderThan(purgeTime);
 
     while (fPurgeableQueue.count()) {
         const GrStdSteadyClock::time_point resourceTime =
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index 08a5f65..f3b90a5 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -26,7 +26,7 @@
 class SkTraceMemoryDump;
 class GrSingleOwner;
 class GrTexture;
-class GrThreadSafeUniquelyKeyedProxyViewCache;
+class GrThreadSafeCache;
 
 struct GrTextureFreedMessage {
     GrTexture* fTexture;
@@ -239,8 +239,8 @@
     void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const;
 
     void setProxyProvider(GrProxyProvider* proxyProvider) { fProxyProvider = proxyProvider; }
-    void setThreadSafeViewCache(GrThreadSafeUniquelyKeyedProxyViewCache* threadSafeViewCache) {
-        fThreadSafeViewCache = threadSafeViewCache;
+    void setThreadSafeCache(GrThreadSafeCache* threadSafeCache) {
+        fThreadSafeCache = threadSafeCache;
     }
 
 private:
@@ -327,7 +327,7 @@
     typedef SkTDArray<GrGpuResource*> ResourceArray;
 
     GrProxyProvider*                    fProxyProvider = nullptr;
-    GrThreadSafeUniquelyKeyedProxyViewCache* fThreadSafeViewCache = nullptr;
+    GrThreadSafeCache*                  fThreadSafeCache = nullptr;
 
     // Whenever a resource is added to the cache or the result of a cache lookup, fTimestamp is
     // assigned as the resource's timestamp and then incremented. fPurgeableQueue orders the
diff --git a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp b/src/gpu/GrThreadSafeCache.cpp
similarity index 74%
rename from src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp
rename to src/gpu/GrThreadSafeCache.cpp
index 312e2ba..0db8002 100644
--- a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.cpp
+++ b/src/gpu/GrThreadSafeCache.cpp
@@ -5,7 +5,7 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 
 #include "include/gpu/GrDirectContext.h"
 #include "src/gpu/GrContextPriv.h"
@@ -13,29 +13,29 @@
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrResourceCache.h"
 
-GrThreadSafeUniquelyKeyedProxyViewCache::GrThreadSafeUniquelyKeyedProxyViewCache()
+GrThreadSafeCache::GrThreadSafeCache()
     : fFreeEntryList(nullptr) {
 }
 
-GrThreadSafeUniquelyKeyedProxyViewCache::~GrThreadSafeUniquelyKeyedProxyViewCache() {
+GrThreadSafeCache::~GrThreadSafeCache() {
     this->dropAllRefs();
 }
 
 #if GR_TEST_UTILS
-int GrThreadSafeUniquelyKeyedProxyViewCache::numEntries() const {
+int GrThreadSafeCache::numEntries() const {
     SkAutoSpinlock lock{fSpinLock};
 
     return fUniquelyKeyedProxyViewMap.count();
 }
 
-size_t GrThreadSafeUniquelyKeyedProxyViewCache::approxBytesUsedForHash() const {
+size_t GrThreadSafeCache::approxBytesUsedForHash() const {
     SkAutoSpinlock lock{fSpinLock};
 
     return fUniquelyKeyedProxyViewMap.approxBytesUsed();
 }
 #endif
 
-void GrThreadSafeUniquelyKeyedProxyViewCache::dropAllRefs() {
+void GrThreadSafeCache::dropAllRefs() {
     SkAutoSpinlock lock{fSpinLock};
 
     fUniquelyKeyedProxyViewMap.reset();
@@ -48,7 +48,7 @@
 
 // TODO: If iterating becomes too expensive switch to using something like GrIORef for the
 // GrSurfaceProxy
-void GrThreadSafeUniquelyKeyedProxyViewCache::dropUniqueRefs(GrResourceCache* resourceCache) {
+void GrThreadSafeCache::dropUniqueRefs(GrResourceCache* resourceCache) {
     SkAutoSpinlock lock{fSpinLock};
 
     // Iterate from LRU to MRU
@@ -71,8 +71,7 @@
     }
 }
 
-void GrThreadSafeUniquelyKeyedProxyViewCache::dropUniqueRefsOlderThan(
-        GrStdSteadyClock::time_point purgeTime) {
+void GrThreadSafeCache::dropUniqueRefsOlderThan(GrStdSteadyClock::time_point purgeTime) {
     SkAutoSpinlock lock{fSpinLock};
 
     // Iterate from LRU to MRU
@@ -96,7 +95,7 @@
     }
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeUniquelyKeyedProxyViewCache::internalFind(
+std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeCache::internalFind(
                                                        const GrUniqueKey& key) {
     Entry* tmp = fUniquelyKeyedProxyViewMap.find(key);
     if (tmp) {
@@ -111,7 +110,7 @@
     return {};
 }
 
-GrSurfaceProxyView GrThreadSafeUniquelyKeyedProxyViewCache::find(const GrUniqueKey& key) {
+GrSurfaceProxyView GrThreadSafeCache::find(const GrUniqueKey& key) {
     SkAutoSpinlock lock{fSpinLock};
 
     GrSurfaceProxyView view;
@@ -119,16 +118,15 @@
     return view;
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeUniquelyKeyedProxyViewCache::findWithData(
+std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeCache::findWithData(
                                                                         const GrUniqueKey& key) {
     SkAutoSpinlock lock{fSpinLock};
 
     return this->internalFind(key);
 }
 
-GrThreadSafeUniquelyKeyedProxyViewCache::Entry*
-GrThreadSafeUniquelyKeyedProxyViewCache::getEntry(const GrUniqueKey& key,
-                                                  const GrSurfaceProxyView& view) {
+GrThreadSafeCache::Entry* GrThreadSafeCache::getEntry(const GrUniqueKey& key,
+                                                      const GrSurfaceProxyView& view) {
     Entry* entry;
 
     if (fFreeEntryList) {
@@ -149,7 +147,7 @@
     return entry;
 }
 
-void GrThreadSafeUniquelyKeyedProxyViewCache::recycleEntry(Entry* dead) {
+void GrThreadSafeCache::recycleEntry(Entry* dead) {
     SkASSERT(!dead->fPrev && !dead->fNext && !dead->fList);
 
     dead->fKey.reset();
@@ -159,7 +157,7 @@
     fFreeEntryList = dead;
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeUniquelyKeyedProxyViewCache::internalAdd(
+std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeCache::internalAdd(
                                                                 const GrUniqueKey& key,
                                                                 const GrSurfaceProxyView& view) {
     Entry* tmp = fUniquelyKeyedProxyViewMap.find(key);
@@ -172,8 +170,7 @@
     return { tmp->fView, tmp->fKey.refCustomData() };
 }
 
-GrSurfaceProxyView GrThreadSafeUniquelyKeyedProxyViewCache::add(const GrUniqueKey& key,
-                                                                const GrSurfaceProxyView& view) {
+GrSurfaceProxyView GrThreadSafeCache::add(const GrUniqueKey& key, const GrSurfaceProxyView& view) {
     SkAutoSpinlock lock{fSpinLock};
 
     GrSurfaceProxyView newView;
@@ -181,7 +178,7 @@
     return newView;
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeUniquelyKeyedProxyViewCache::addWithData(
+std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeCache::addWithData(
                                                                 const GrUniqueKey& key,
                                                                 const GrSurfaceProxyView& view) {
     SkAutoSpinlock lock{fSpinLock};
@@ -189,8 +186,8 @@
     return this->internalAdd(key, view);
 }
 
-GrSurfaceProxyView GrThreadSafeUniquelyKeyedProxyViewCache::findOrAdd(const GrUniqueKey& key,
-                                                                      const GrSurfaceProxyView& v) {
+GrSurfaceProxyView GrThreadSafeCache::findOrAdd(const GrUniqueKey& key,
+                                                const GrSurfaceProxyView& v) {
     SkAutoSpinlock lock{fSpinLock};
 
     GrSurfaceProxyView view;
@@ -203,7 +200,7 @@
     return view;
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeUniquelyKeyedProxyViewCache::findOrAddWithData(
+std::tuple<GrSurfaceProxyView, sk_sp<SkData>> GrThreadSafeCache::findOrAddWithData(
                                                                       const GrUniqueKey& key,
                                                                       const GrSurfaceProxyView& v) {
     SkAutoSpinlock lock{fSpinLock};
@@ -216,7 +213,7 @@
     return this->internalAdd(key, v);
 }
 
-void GrThreadSafeUniquelyKeyedProxyViewCache::remove(const GrUniqueKey& key) {
+void GrThreadSafeCache::remove(const GrUniqueKey& key) {
     SkAutoSpinlock lock{fSpinLock};
 
     Entry* tmp = fUniquelyKeyedProxyViewMap.find(key);
@@ -227,12 +224,12 @@
     }
 }
 
-std::tuple<GrSurfaceProxyView, sk_sp<GrThreadSafeUniquelyKeyedProxyViewCache::Trampoline>>
-GrThreadSafeUniquelyKeyedProxyViewCache::CreateLazyView(GrDirectContext* dContext,
-                                                        GrColorType origCT,
-                                                        SkISize dimensions,
-                                                        GrSurfaceOrigin origin,
-                                                        SkBackingFit fit) {
+std::tuple<GrSurfaceProxyView, sk_sp<GrThreadSafeCache::Trampoline>>
+GrThreadSafeCache::CreateLazyView(GrDirectContext* dContext,
+                                  GrColorType origCT,
+                                  SkISize dimensions,
+                                  GrSurfaceOrigin origin,
+                                  SkBackingFit fit) {
     GrProxyProvider* proxyProvider = dContext->priv().proxyProvider();
 
     constexpr int kSampleCnt = 1;
diff --git a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h b/src/gpu/GrThreadSafeCache.h
similarity index 95%
rename from src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h
rename to src/gpu/GrThreadSafeCache.h
index 3c5d975..27a990e 100644
--- a/src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h
+++ b/src/gpu/GrThreadSafeCache.h
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrThreadSafeUniquelyKeyedProxyViewCache_DEFINED
-#define GrThreadSafeUniquelyKeyedProxyViewCache_DEFINED
+#ifndef GrThreadSafeCache_DEFINED
+#define GrThreadSafeCache_DEFINED
 
 #include "include/private/SkSpinlock.h"
 #include "src/core/SkArenaAlloc.h"
@@ -60,10 +60,10 @@
 //
 //    For GrContext::performDeferredCleanup, any uniquely held resources that haven't been accessed
 //    w/in 'msNotUsed' will be released from this cache prior to the resource cache being cleaned.
-class GrThreadSafeUniquelyKeyedProxyViewCache {
+class GrThreadSafeCache {
 public:
-    GrThreadSafeUniquelyKeyedProxyViewCache();
-    ~GrThreadSafeUniquelyKeyedProxyViewCache();
+    GrThreadSafeCache();
+    ~GrThreadSafeCache();
 
 #if GR_TEST_UTILS
     int numEntries() const  SK_EXCLUDES(fSpinLock);
@@ -146,4 +146,4 @@
     Entry*                       fFreeEntryList  SK_GUARDED_BY(fSpinLock);
 };
 
-#endif // GrThreadSafeUniquelyKeyedProxyViewCache_DEFINED
+#endif // GrThreadSafeCache_DEFINED
diff --git a/src/gpu/effects/GrCircleBlurFragmentProcessor.fp b/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
index fa8c5e4..e333eb5 100644
--- a/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
+++ b/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
@@ -42,7 +42,7 @@
     #include "src/gpu/GrBitmapTextureMaker.h"
     #include "src/gpu/GrProxyProvider.h"
     #include "src/gpu/GrRecordingContextPriv.h"
-    #include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+    #include "src/gpu/GrThreadSafeCache.h"
 
     // Computes an unnormalized half kernel (right side). Returns the summation of all the half
     // kernel values.
@@ -205,7 +205,7 @@
             return nullptr;
         }
 
-        auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+        auto threadSafeCache = rContext->priv().threadSafeCache();
 
         // Profile textures are cached by the ratio of sigma to circle radius and by the size of the
         // profile texture (binned by powers of 2).
@@ -247,7 +247,7 @@
         builder[0] = sigmaToCircleRRatioFixed;
         builder.finish();
 
-        GrSurfaceProxyView profileView = threadSafeViewCache->find(key);
+        GrSurfaceProxyView profileView = threadSafeCache->find(key);
         if (profileView) {
             SkASSERT(profileView.asTextureProxy());
             SkASSERT(profileView.origin() == kTopLeft_GrSurfaceOrigin);
@@ -276,7 +276,7 @@
             return nullptr;
         }
 
-        profileView = threadSafeViewCache->add(key, profileView);
+        profileView = threadSafeCache->add(key, profileView);
         return GrTextureEffect::Make(std::move(profileView), kPremul_SkAlphaType, texM);
     }
 
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 0e65ede..778dc27 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -13,7 +13,7 @@
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 #include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
@@ -102,12 +102,12 @@
     }
 
     // Find or create a texture.
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
     SkColorType colorType = useA16 ? kA16_float_SkColorType : kAlpha_8_SkColorType;
 
     GrSurfaceProxyView view;
-    if (kCacheKernelTexture && (view = threadSafeViewCache->find(key))) {
+    if (kCacheKernelTexture && (view = threadSafeCache->find(key))) {
         SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
         auto kernelFP = GrTextureEffect::Make(std::move(view), kUnknown_SkAlphaType);
         return {result, std::move(kernelFP)};
@@ -135,7 +135,7 @@
     }
 
     if (kCacheKernelTexture) {
-        view = threadSafeViewCache->add(key, view);
+        view = threadSafeCache->add(key, view);
     }
 
     SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
diff --git a/src/gpu/effects/GrRRectBlurEffect.fp b/src/gpu/effects/GrRRectBlurEffect.fp
index 11d8035..8230359 100644
--- a/src/gpu/effects/GrRRectBlurEffect.fp
+++ b/src/gpu/effects/GrRRectBlurEffect.fp
@@ -48,7 +48,7 @@
     #include "src/gpu/GrRecordingContextPriv.h"
     #include "src/gpu/GrRenderTargetContext.h"
     #include "src/gpu/GrStyle.h"
-    #include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+    #include "src/gpu/GrThreadSafeCache.h"
     #include "src/gpu/effects/GrTextureEffect.h"
 
     static constexpr auto kBlurredRRectMaskOrigin = kTopLeft_GrSurfaceOrigin;
@@ -76,7 +76,7 @@
     static bool fillin_view_on_gpu(
                             GrDirectContext* dContext,
                             const GrSurfaceProxyView& lazyView,
-                            sk_sp<GrThreadSafeUniquelyKeyedProxyViewCache::Trampoline> trampoline,
+                            sk_sp<GrThreadSafeCache::Trampoline> trampoline,
                             const SkRRect& rrectToDraw,
                             const SkISize& dimensions,
                             float xformedSigma) {
@@ -254,7 +254,7 @@
         GrUniqueKey key;
         make_blurred_rrect_key(&key, rrectToDraw, xformedSigma);
 
-        auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+        auto threadSafeCache = rContext->priv().threadSafeCache();
 
         // It seems like we could omit this matrix and modify the shader code to not normalize
         // the coords used to sample the texture effect. However, the "proxyDims" value in the
@@ -269,14 +269,14 @@
         if (GrDirectContext* dContext = rContext->asDirectContext()) {
             // The gpu thread gets priority over the recording threads. If the gpu thread is first,
             // it crams a lazy proxy into the cache and then fills it in later.
-            auto[lazyView, trampoline] = GrThreadSafeUniquelyKeyedProxyViewCache::CreateLazyView(
+            auto[lazyView, trampoline] = GrThreadSafeCache::CreateLazyView(
                                     dContext, GrColorType::kAlpha_8, dimensions,
                                     kBlurredRRectMaskOrigin, SkBackingFit::kExact);
             if (!lazyView) {
                 return nullptr;
             }
 
-            view = threadSafeViewCache->findOrAdd(key, lazyView);
+            view = threadSafeCache->findOrAdd(key, lazyView);
             if (view != lazyView) {
                 SkASSERT(view.asTextureProxy());
                 SkASSERT(view.origin() == kBlurredRRectMaskOrigin);
@@ -287,11 +287,11 @@
                                     rrectToDraw, dimensions, xformedSigma)) {
                 // In this case something has gone disastrously wrong so set up to drop the draw
                 // that needed this resource and reduce future pollution of the cache.
-                threadSafeViewCache->remove(key);
+                threadSafeCache->remove(key);
                 return nullptr;
             }
         } else {
-            view = threadSafeViewCache->find(key);
+            view = threadSafeCache->find(key);
             if (view) {
                 SkASSERT(view.asTextureProxy());
                 SkASSERT(view.origin() == kBlurredRRectMaskOrigin);
@@ -303,7 +303,7 @@
                 return nullptr;
             }
 
-            view = threadSafeViewCache->add(key, view);
+            view = threadSafeCache->add(key, view);
         }
 
         SkASSERT(view.asTextureProxy());
diff --git a/src/gpu/effects/GrRectBlurEffect.fp b/src/gpu/effects/GrRectBlurEffect.fp
index c92d969..3b0c912 100644
--- a/src/gpu/effects/GrRectBlurEffect.fp
+++ b/src/gpu/effects/GrRectBlurEffect.fp
@@ -17,7 +17,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrShaderCaps.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 }
 
@@ -54,7 +54,7 @@
 @class {
 static std::unique_ptr<GrFragmentProcessor> MakeIntegralFP(GrRecordingContext* rContext,
                                                            float sixSigma) {
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
     int width = SkCreateIntegralTable(sixSigma, nullptr);
 
@@ -66,7 +66,7 @@
 
     SkMatrix m = SkMatrix::Scale(width/sixSigma, 1.f);
 
-    GrSurfaceProxyView view = threadSafeViewCache->find(key);
+    GrSurfaceProxyView view = threadSafeCache->find(key);
 
     if (view) {
         SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
@@ -85,7 +85,7 @@
         return {};
     }
 
-    view = threadSafeViewCache->add(key, view);
+    view = threadSafeCache->add(key, view);
 
     SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
     return GrTextureEffect::Make(
diff --git a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
index 1e13968..2b1ac09 100644
--- a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
+++ b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
@@ -14,7 +14,7 @@
 #include "src/gpu/GrBitmapTextureMaker.h"
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 
 // Computes an unnormalized half kernel (right side). Returns the summation of all the half
 // kernel values.
@@ -187,7 +187,7 @@
         return nullptr;
     }
 
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
     // Profile textures are cached by the ratio of sigma to circle radius and by the size of the
     // profile texture (binned by powers of 2).
@@ -229,7 +229,7 @@
     builder[0] = sigmaToCircleRRatioFixed;
     builder.finish();
 
-    GrSurfaceProxyView profileView = threadSafeViewCache->find(key);
+    GrSurfaceProxyView profileView = threadSafeCache->find(key);
     if (profileView) {
         SkASSERT(profileView.asTextureProxy());
         SkASSERT(profileView.origin() == kTopLeft_GrSurfaceOrigin);
@@ -258,7 +258,7 @@
         return nullptr;
     }
 
-    profileView = threadSafeViewCache->add(key, profileView);
+    profileView = threadSafeCache->add(key, profileView);
     return GrTextureEffect::Make(std::move(profileView), kPremul_SkAlphaType, texM);
 }
 
@@ -307,18 +307,18 @@
                 args.fUniformHandler->getUniformCStr(circleDataVar),
                 args.fUniformHandler->getUniformCStr(circleDataVar),
                 args.fUniformHandler->getUniformCStr(circleDataVar));
-        SkString _sample13801 = this->invokeChild(0, args);
+        SkString _sample13763 = this->invokeChild(0, args);
         fragBuilder->codeAppendf(
                 R"SkSL(
 half4 inputColor = %s;)SkSL",
-                _sample13801.c_str());
-        SkString _coords13849("float2(half2(dist, 0.5))");
-        SkString _sample13849 = this->invokeChild(1, args, _coords13849.c_str());
+                _sample13763.c_str());
+        SkString _coords13811("float2(half2(dist, 0.5))");
+        SkString _sample13811 = this->invokeChild(1, args, _coords13811.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
 %s = inputColor * %s.w;
 )SkSL",
-                args.fOutputColor, _sample13849.c_str());
+                args.fOutputColor, _sample13811.c_str());
     }
 
 private:
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.cpp b/src/gpu/effects/generated/GrRRectBlurEffect.cpp
index 42543b5..4a5c62c 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.cpp
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.cpp
@@ -24,7 +24,7 @@
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrStyle.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 
 static constexpr auto kBlurredRRectMaskOrigin = kTopLeft_GrSurfaceOrigin;
@@ -48,13 +48,12 @@
     builder.finish();
 }
 
-static bool fillin_view_on_gpu(
-        GrDirectContext* dContext,
-        const GrSurfaceProxyView& lazyView,
-        sk_sp<GrThreadSafeUniquelyKeyedProxyViewCache::Trampoline> trampoline,
-        const SkRRect& rrectToDraw,
-        const SkISize& dimensions,
-        float xformedSigma) {
+static bool fillin_view_on_gpu(GrDirectContext* dContext,
+                               const GrSurfaceProxyView& lazyView,
+                               sk_sp<GrThreadSafeCache::Trampoline> trampoline,
+                               const SkRRect& rrectToDraw,
+                               const SkISize& dimensions,
+                               float xformedSigma) {
     std::unique_ptr<GrRenderTargetContext> rtc = GrRenderTargetContext::MakeWithFallback(
             dContext, GrColorType::kAlpha_8, nullptr, SkBackingFit::kExact, dimensions, 1,
             GrMipmapped::kNo, GrProtected::kNo, kBlurredRRectMaskOrigin);
@@ -232,7 +231,7 @@
     GrUniqueKey key;
     make_blurred_rrect_key(&key, rrectToDraw, xformedSigma);
 
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
     // It seems like we could omit this matrix and modify the shader code to not normalize
     // the coords used to sample the texture effect. However, the "proxyDims" value in the
@@ -247,14 +246,14 @@
     if (GrDirectContext* dContext = rContext->asDirectContext()) {
         // The gpu thread gets priority over the recording threads. If the gpu thread is first,
         // it crams a lazy proxy into the cache and then fills it in later.
-        auto[lazyView, trampoline] = GrThreadSafeUniquelyKeyedProxyViewCache::CreateLazyView(
-                dContext, GrColorType::kAlpha_8, dimensions, kBlurredRRectMaskOrigin,
-                SkBackingFit::kExact);
+        auto[lazyView, trampoline] =
+                GrThreadSafeCache::CreateLazyView(dContext, GrColorType::kAlpha_8, dimensions,
+                                                  kBlurredRRectMaskOrigin, SkBackingFit::kExact);
         if (!lazyView) {
             return nullptr;
         }
 
-        view = threadSafeViewCache->findOrAdd(key, lazyView);
+        view = threadSafeCache->findOrAdd(key, lazyView);
         if (view != lazyView) {
             SkASSERT(view.asTextureProxy());
             SkASSERT(view.origin() == kBlurredRRectMaskOrigin);
@@ -265,11 +264,11 @@
                                 xformedSigma)) {
             // In this case something has gone disastrously wrong so set up to drop the draw
             // that needed this resource and reduce future pollution of the cache.
-            threadSafeViewCache->remove(key);
+            threadSafeCache->remove(key);
             return nullptr;
         }
     } else {
-        view = threadSafeViewCache->find(key);
+        view = threadSafeCache->find(key);
         if (view) {
             SkASSERT(view.asTextureProxy());
             SkASSERT(view.origin() == kBlurredRRectMaskOrigin);
@@ -281,7 +280,7 @@
             return nullptr;
         }
 
-        view = threadSafeViewCache->add(key, view);
+        view = threadSafeCache->add(key, view);
     }
 
     SkASSERT(view.asTextureProxy());
@@ -377,18 +376,18 @@
                 args.fUniformHandler->getUniformCStr(proxyRectVar),
                 args.fUniformHandler->getUniformCStr(blurRadiusVar),
                 args.fUniformHandler->getUniformCStr(cornerRadiusVar));
-        SkString _sample17268 = this->invokeChild(0, args);
+        SkString _sample17178 = this->invokeChild(0, args);
         fragBuilder->codeAppendf(
                 R"SkSL(
 half4 inputColor = %s;)SkSL",
-                _sample17268.c_str());
-        SkString _coords17316("float2(texCoord)");
-        SkString _sample17316 = this->invokeChild(1, args, _coords17316.c_str());
+                _sample17178.c_str());
+        SkString _coords17226("float2(texCoord)");
+        SkString _sample17226 = this->invokeChild(1, args, _coords17226.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
 %s = inputColor * %s;
 )SkSL",
-                args.fOutputColor, _sample17316.c_str());
+                args.fOutputColor, _sample17226.c_str());
     }
 
 private:
diff --git a/src/gpu/effects/generated/GrRectBlurEffect.cpp b/src/gpu/effects/generated/GrRectBlurEffect.cpp
index 9763f3f..e0ed896 100644
--- a/src/gpu/effects/generated/GrRectBlurEffect.cpp
+++ b/src/gpu/effects/generated/GrRectBlurEffect.cpp
@@ -70,14 +70,14 @@
                 rectFVar.isValid() ? args.fUniformHandler->getUniformCStr(rectFVar) : "float4(0)",
                 rectHVar.isValid() ? args.fUniformHandler->getUniformCStr(rectHVar) : "half4(0)",
                 rectHVar.isValid() ? args.fUniformHandler->getUniformCStr(rectHVar) : "half4(0)");
-        SkString _coords8175("float2(half2(xy.x, 0.5))");
-        SkString _sample8175 = this->invokeChild(1, args, _coords8175.c_str());
+        SkString _coords8137("float2(half2(xy.x, 0.5))");
+        SkString _sample8137 = this->invokeChild(1, args, _coords8137.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
     xCoverage = %s.w;)SkSL",
-                _sample8175.c_str());
-        SkString _coords8233("float2(half2(xy.y, 0.5))");
-        SkString _sample8233 = this->invokeChild(1, args, _coords8233.c_str());
+                _sample8137.c_str());
+        SkString _coords8195("float2(half2(xy.y, 0.5))");
+        SkString _sample8195 = this->invokeChild(1, args, _coords8195.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
     yCoverage = %s.w;
@@ -90,35 +90,35 @@
         rect.xy = half2(float2(%s.xy) - pos);
         rect.zw = half2(pos - float2(%s.zw));
     })SkSL",
-                _sample8233.c_str(),
+                _sample8195.c_str(),
                 rectFVar.isValid() ? args.fUniformHandler->getUniformCStr(rectFVar) : "float4(0)",
                 rectFVar.isValid() ? args.fUniformHandler->getUniformCStr(rectFVar) : "float4(0)",
                 rectHVar.isValid() ? args.fUniformHandler->getUniformCStr(rectHVar) : "half4(0)",
                 rectHVar.isValid() ? args.fUniformHandler->getUniformCStr(rectHVar) : "half4(0)");
-        SkString _coords9552("float2(half2(rect.x, 0.5))");
-        SkString _sample9552 = this->invokeChild(1, args, _coords9552.c_str());
-        SkString _coords9615("float2(half2(rect.z, 0.5))");
-        SkString _sample9615 = this->invokeChild(1, args, _coords9615.c_str());
+        SkString _coords9514("float2(half2(rect.x, 0.5))");
+        SkString _sample9514 = this->invokeChild(1, args, _coords9514.c_str());
+        SkString _coords9577("float2(half2(rect.z, 0.5))");
+        SkString _sample9577 = this->invokeChild(1, args, _coords9577.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
     xCoverage = (1.0 - %s.w) - %s.w;)SkSL",
-                _sample9552.c_str(), _sample9615.c_str());
-        SkString _coords9679("float2(half2(rect.y, 0.5))");
-        SkString _sample9679 = this->invokeChild(1, args, _coords9679.c_str());
-        SkString _coords9742("float2(half2(rect.w, 0.5))");
-        SkString _sample9742 = this->invokeChild(1, args, _coords9742.c_str());
+                _sample9514.c_str(), _sample9577.c_str());
+        SkString _coords9641("float2(half2(rect.y, 0.5))");
+        SkString _sample9641 = this->invokeChild(1, args, _coords9641.c_str());
+        SkString _coords9704("float2(half2(rect.w, 0.5))");
+        SkString _sample9704 = this->invokeChild(1, args, _coords9704.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
     yCoverage = (1.0 - %s.w) - %s.w;
 })SkSL",
-                _sample9679.c_str(), _sample9742.c_str());
-        SkString _sample9811 = this->invokeChild(0, args);
+                _sample9641.c_str(), _sample9704.c_str());
+        SkString _sample9773 = this->invokeChild(0, args);
         fragBuilder->codeAppendf(
                 R"SkSL(
 half4 inputColor = %s;
 %s = (inputColor * xCoverage) * yCoverage;
 )SkSL",
-                _sample9811.c_str(), args.fOutputColor);
+                _sample9773.c_str(), args.fOutputColor);
     }
 
 private:
diff --git a/src/gpu/effects/generated/GrRectBlurEffect.h b/src/gpu/effects/generated/GrRectBlurEffect.h
index 0e67f7e..9dce2cc 100644
--- a/src/gpu/effects/generated/GrRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRectBlurEffect.h
@@ -25,7 +25,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrShaderCaps.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 
 #include "src/gpu/GrFragmentProcessor.h"
@@ -34,7 +34,7 @@
 public:
     static std::unique_ptr<GrFragmentProcessor> MakeIntegralFP(GrRecordingContext* rContext,
                                                                float sixSigma) {
-        auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+        auto threadSafeCache = rContext->priv().threadSafeCache();
 
         int width = SkCreateIntegralTable(sixSigma, nullptr);
 
@@ -46,7 +46,7 @@
 
         SkMatrix m = SkMatrix::Scale(width / sixSigma, 1.f);
 
-        GrSurfaceProxyView view = threadSafeViewCache->find(key);
+        GrSurfaceProxyView view = threadSafeCache->find(key);
 
         if (view) {
             SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
@@ -65,7 +65,7 @@
             return {};
         }
 
-        view = threadSafeViewCache->add(key, view);
+        view = threadSafeCache->add(key, view);
 
         SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
         return GrTextureEffect::Make(std::move(view), kPremul_SkAlphaType, m,
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp
index fd4cd10..65ff5a2 100644
--- a/src/gpu/ops/GrShadowRRectOp.cpp
+++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -16,7 +16,7 @@
 #include "src/gpu/GrProgramInfo.h"
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrThreadSafeUniquelyKeyedProxyViewCache.h"
+#include "src/gpu/GrThreadSafeCache.h"
 #include "src/gpu/effects/GrShadowGeoProc.h"
 #include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
 
@@ -669,9 +669,9 @@
     GrUniqueKey::Builder builder(&key, kDomain, 0, "Shadow Gaussian Falloff");
     builder.finish();
 
-    auto threadSafeViewCache = rContext->priv().threadSafeViewCache();
+    auto threadSafeCache = rContext->priv().threadSafeCache();
 
-    GrSurfaceProxyView view = threadSafeViewCache->find(key);
+    GrSurfaceProxyView view = threadSafeCache->find(key);
     if (view) {
         SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
         return view;
@@ -697,7 +697,7 @@
         return {};
     }
 
-    view = threadSafeViewCache->add(key, view);
+    view = threadSafeCache->add(key, view);
     SkASSERT(view.origin() == kTopLeft_GrSurfaceOrigin);
     return view;
 }