Make GrSurfaceProxy constructors take arg that determines participation in
GrResourceAllocator.

Removes LazyInstantiationType. All callbacks can be invoked one time (if successful).
Lazy callbacks indicate whether their lifetime should be extended, which is used by
promise image proxy callbacks.

Promise image proxies are no longer deinstantiated at the end of flush and
GrDeinstantiateProxyTracker is removed. They will be instantiated the first time
they are encountered in GrResourceAllocator::addInterval (without actually adding
an interval) and then remain instantiated.

Also removes some "helper" versions of proxy factory functions that took fewer
params. They weren't much used outside of test code and as the total number of params
has grown their relative utility has diminished. We could consider a params struct
or radically simpler helpers that take only a few params if desired.

Change-Id: Ic6b09e7b807b66cb9fcbb7a67ae0f9faf345485f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index c4beaf8..a2d681a 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -84,8 +84,6 @@
   "$_src/gpu/GrDefaultGeoProcFactory.h",
   "$_src/gpu/GrDeferredProxyUploader.h",
   "$_src/gpu/GrDeferredUpload.h",
-  "$_src/gpu/GrDeinstantiateProxyTracker.cpp",
-  "$_src/gpu/GrDeinstantiateProxyTracker.h",
   "$_src/gpu/GrDistanceFieldGenFromVector.cpp",
   "$_src/gpu/GrDistanceFieldGenFromVector.h",
   "$_src/gpu/GrDrawingManager.cpp",
diff --git a/src/core/SkDeferredDisplayListRecorder.cpp b/src/core/SkDeferredDisplayListRecorder.cpp
index d198843..1149c15 100644
--- a/src/core/SkDeferredDisplayListRecorder.cpp
+++ b/src/core/SkDeferredDisplayListRecorder.cpp
@@ -167,7 +167,7 @@
                 // prior to the proxy backing the DLL's surface. Steal its GrRenderTarget.
                 SkASSERT(lazyProxyData->fReplayDest->peekSurface());
                 auto surface = sk_ref_sp<GrSurface>(lazyProxyData->fReplayDest->peekSurface());
-                return GrSurfaceProxy::LazyInstantiationResult(std::move(surface));
+                return GrSurfaceProxy::LazyCallbackResult(std::move(surface));
             },
             fCharacterization.backendFormat(),
             desc,
@@ -179,7 +179,8 @@
             SkBackingFit::kExact,
             SkBudgeted::kYes,
             fCharacterization.isProtected(),
-            fCharacterization.vulkanSecondaryCBCompatible());
+            fCharacterization.vulkanSecondaryCBCompatible(),
+            GrSurfaceProxy::UseAllocator::kYes);
 
     if (!proxy) {
         return false;
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index ff01f11..dd97f03 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -150,9 +150,9 @@
     };
 
     sk_sp<GrTextureProxy> texProxy = proxyProvider->createLazyProxy(
-            [direct, buffer = AutoAHBRelease(hardwareBuffer), width, height,
-             isProtectedContent, backendFormat, grColorType](GrResourceProvider* resourceProvider)
-                    -> GrSurfaceProxy::LazyInstantiationResult {
+            [direct, buffer = AutoAHBRelease(hardwareBuffer), width, height, isProtectedContent,
+             backendFormat, grColorType](
+                    GrResourceProvider* resourceProvider) -> GrSurfaceProxy::LazyCallbackResult {
                 GrAHardwareBufferUtils::DeleteImageProc deleteImageProc = nullptr;
                 GrAHardwareBufferUtils::UpdateImageProc updateImageProc = nullptr;
                 GrAHardwareBufferUtils::TexImageCtx texImageCtx = nullptr;
@@ -190,7 +190,7 @@
             },
             backendFormat, desc, GrRenderable::kNo, 1, fSurfaceOrigin, GrMipMapped::kNo,
             GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags::kReadOnly, SkBackingFit::kExact,
-            SkBudgeted::kNo, GrProtected::kNo);
+            SkBudgeted::kNo, GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
 
     return texProxy;
 }
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp
index 0f0ec38..5f54140 100644
--- a/src/gpu/GrBackendTextureImageGenerator.cpp
+++ b/src/gpu/GrBackendTextureImageGenerator.cpp
@@ -161,8 +161,8 @@
     // be deleted before we actually execute the lambda.
     sk_sp<GrTextureProxy> proxy = proxyProvider->createLazyProxy(
             [refHelper = fRefHelper, releaseProcHelper, semaphore = fSemaphore,
-             backendTexture = fBackendTexture, grColorType](GrResourceProvider* resourceProvider)
-                    -> GrSurfaceProxy::LazyInstantiationResult {
+             backendTexture = fBackendTexture, grColorType](
+                    GrResourceProvider* resourceProvider) -> GrSurfaceProxy::LazyCallbackResult {
                 if (semaphore) {
                     resourceProvider->priv().gpu()->waitSemaphore(semaphore);
                 }
@@ -197,11 +197,11 @@
                 }
                 // We use keys to avoid re-wrapping the GrBackendTexture in a GrTexture. This is
                 // unrelated to the whatever SkImage key may be assigned to the proxy.
-                return {std::move(tex), GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced};
+                return {std::move(tex), true, GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced};
             },
             backendFormat, desc, GrRenderable::kNo, 1, fSurfaceOrigin, mipMapped, mipMapsStatus,
             GrInternalSurfaceFlags::kReadOnly, SkBackingFit::kExact, SkBudgeted::kNo,
-            GrProtected::kNo);
+            GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
     if (!proxy) {
         return nullptr;
     }
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 5d862d4..2db564f 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -498,9 +498,15 @@
 
         // MDB TODO: We're going to fill this proxy with an ASAP upload (which is out of order wrt
         // to ops), so it can't have any pending IO.
-        proxy = proxyProvider->createProxy(format, desc, GrRenderable::kNo, 1,
-                                           kTopLeft_GrSurfaceOrigin, SkBackingFit::kApprox,
-                                           SkBudgeted::kYes, GrProtected::kNo);
+        proxy = proxyProvider->createProxy(format,
+                                           desc,
+                                           GrRenderable::kNo,
+                                           1,
+                                           kTopLeft_GrSurfaceOrigin,
+                                           GrMipMapped::kNo,
+                                           SkBackingFit::kApprox,
+                                           SkBudgeted::kYes,
+                                           GrProtected::kNo);
 
         auto uploader = skstd::make_unique<GrTDeferredProxyUploader<ClipMaskData>>(reducedClip);
         GrTDeferredProxyUploader<ClipMaskData>* uploaderRaw = uploader.get();
diff --git a/src/gpu/GrDeinstantiateProxyTracker.cpp b/src/gpu/GrDeinstantiateProxyTracker.cpp
deleted file mode 100644
index f250056..0000000
--- a/src/gpu/GrDeinstantiateProxyTracker.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2018 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "src/gpu/GrDeinstantiateProxyTracker.h"
-
-#include "src/gpu/GrSurfaceProxy.h"
-#include "src/gpu/GrSurfaceProxyPriv.h"
-
-void GrDeinstantiateProxyTracker::addProxy(GrSurfaceProxy* proxy) {
-#ifdef SK_DEBUG
-    using LazyType = GrSurfaceProxy::LazyInstantiationType;
-    SkASSERT(LazyType::kDeinstantiate == proxy->priv().lazyInstantiationType());
-    for (int i = 0; i < fProxies.count(); ++i) {
-        SkASSERT(proxy != fProxies[i].get());
-    }
-#endif
-    fProxies.push_back(sk_ref_sp<GrSurfaceProxy>(proxy));
-}
-
-void GrDeinstantiateProxyTracker::deinstantiateAllProxies() {
-    for (int i = 0; i < fProxies.count(); ++i) {
-        GrSurfaceProxy* proxy = fProxies[i].get();
-        SkASSERT(proxy->priv().isSafeToDeinstantiate());
-        proxy->deinstantiate();
-    }
-
-    fProxies.reset();
-}
diff --git a/src/gpu/GrDeinstantiateProxyTracker.h b/src/gpu/GrDeinstantiateProxyTracker.h
deleted file mode 100644
index c6e16d2..0000000
--- a/src/gpu/GrDeinstantiateProxyTracker.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2018 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrDeinstantiateProxyTracker_DEFINED
-#define GrDeinstantiateProxyTracker_DEFINED
-
-#include "include/private/SkTArray.h"
-#include "src/gpu/GrSurfaceProxy.h"
-
-class GrResourceCache;
-
-class GrDeinstantiateProxyTracker {
-public:
-    GrDeinstantiateProxyTracker() {}
-
-    // Adds a proxy which will be deinstantiated at the end of flush. The same proxy may not be
-    // added multiple times.
-    void addProxy(GrSurfaceProxy* proxy);
-
-    // Loops through all tracked proxies and deinstantiates them.
-    void deinstantiateAllProxies();
-
-private:
-    SkTArray<sk_sp<GrSurfaceProxy>> fProxies;
-};
-
-#endif
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index f9e4450..1f4bb38 100644
--- a/src/gpu/GrDrawOpAtlas.cpp
+++ b/src/gpu/GrDrawOpAtlas.cpp
@@ -526,15 +526,14 @@
     int numPlotsY = fTextureHeight/fPlotHeight;
 
     for (uint32_t i = 0; i < this->maxPages(); ++i) {
-        fProxies[i] = proxyProvider->createProxy(fFormat, desc, GrRenderable::kNo, 1,
-                                                 kTopLeft_GrSurfaceOrigin, SkBackingFit::kExact,
-                                                 SkBudgeted::kYes, GrProtected::kNo);
+        fProxies[i] = proxyProvider->createProxy(
+                fFormat, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
+                SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo,
+                GrInternalSurfaceFlags::kNone, GrSurfaceProxy::UseAllocator::kNo);
         if (!fProxies[i]) {
             return false;
         }
 
-        fProxies[i]->priv().setIgnoredByResourceAllocator();
-
         // set up allocated plots
         fPages[i].fPlotArray.reset(new sk_sp<Plot>[ numPlotsX * numPlotsY ]);
 
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 96f35c5..ae3d584 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -299,7 +299,7 @@
             onFlushRenderTask->visitTargetAndSrcProxies_debugOnly(
                     [](GrSurfaceProxy* p, GrMipMapped mipMapped) {
                 SkASSERT(!p->asTextureProxy() || !p->asTextureProxy()->texPriv().isDeferred());
-                SkASSERT(GrSurfaceProxy::LazyState::kNot == p->lazyInstantiationState());
+                SkASSERT(!p->isLazy());
                 if (p->requiresManualMSAAResolve()) {
                     // The onFlush callback is responsible for ensuring MSAA gets resolved.
                     SkASSERT(p->asRenderTargetProxy() && !p->asRenderTargetProxy()->isMSAADirty());
@@ -330,8 +330,7 @@
     bool flushed = false;
 
     {
-        GrResourceAllocator alloc(resourceProvider, flushState.deinstantiateProxyTracker()
-                                  SkDEBUGCODE(, fDAG.numRenderTasks()));
+        GrResourceAllocator alloc(resourceProvider SkDEBUGCODE(, fDAG.numRenderTasks()));
         for (int i = 0; i < fDAG.numRenderTasks(); ++i) {
             if (fDAG.renderTask(i)) {
                 fDAG.renderTask(i)->gatherProxyIntervals(&alloc);
@@ -389,8 +388,6 @@
     GrSemaphoresSubmitted result = gpu->finishFlush(proxies, numProxies, access, info,
                                                     externalRequests);
 
-    flushState.deinstantiateProxyTracker()->deinstantiateAllProxies();
-
     // Give the cache a chance to purge resources that become purgeable due to flushing.
     if (flushed) {
         resourceCache->purgeAsNeeded();
diff --git a/src/gpu/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp
index 74aa77b..a8075a5 100644
--- a/src/gpu/GrOnFlushResourceProvider.cpp
+++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -72,13 +72,16 @@
 }
 
 sk_sp<GrTextureProxy> GrOnFlushResourceProvider::findOrCreateProxyByUniqueKey(
-        const GrUniqueKey& key, GrColorType colorType, GrSurfaceOrigin origin) {
+        const GrUniqueKey& key,
+        GrColorType colorType,
+        GrSurfaceOrigin origin,
+        UseAllocator useAllocator) {
     auto proxyProvider = fDrawingMgr->getContext()->priv().proxyProvider();
-    return proxyProvider->findOrCreateProxyByUniqueKey(key, colorType, origin);
+    return proxyProvider->findOrCreateProxyByUniqueKey(key, colorType, origin, useAllocator);
 }
 
 bool GrOnFlushResourceProvider::instatiateProxy(GrSurfaceProxy* proxy) {
-    SkASSERT(proxy->priv().ignoredByResourceAllocator());
+    SkASSERT(proxy->canSkipResourceAllocator());
 
     // TODO: this class should probably just get a GrDirectContext
     auto direct = fDrawingMgr->getContext()->priv().asDirectContext();
@@ -88,9 +91,7 @@
 
     auto resourceProvider = direct->priv().resourceProvider();
 
-    if (GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState()) {
-        // DDL TODO: Decide if we ever plan to have these proxies use the GrDeinstantiateTracker
-        // to support unistantiating them at the end of a flush.
+    if (proxy->isLazy()) {
         return proxy->priv().doLazyInstantiation(resourceProvider);
     }
 
diff --git a/src/gpu/GrOnFlushResourceProvider.h b/src/gpu/GrOnFlushResourceProvider.h
index 7dd2847..78a31f3 100644
--- a/src/gpu/GrOnFlushResourceProvider.h
+++ b/src/gpu/GrOnFlushResourceProvider.h
@@ -61,6 +61,8 @@
  */
 class GrOnFlushResourceProvider {
 public:
+    using UseAllocator = GrSurfaceProxy::UseAllocator;
+
     explicit GrOnFlushResourceProvider(GrDrawingManager* drawingMgr) : fDrawingMgr(drawingMgr) {}
 
     std::unique_ptr<GrRenderTargetContext> makeRenderTargetContext(
@@ -73,8 +75,10 @@
     void removeUniqueKeyFromProxy(GrTextureProxy*);
     void processInvalidUniqueKey(const GrUniqueKey&);
     // GrColorType is necessary to set the proxy's texture swizzle.
-    sk_sp<GrTextureProxy> findOrCreateProxyByUniqueKey(const GrUniqueKey&, GrColorType,
-                                                       GrSurfaceOrigin);
+    sk_sp<GrTextureProxy> findOrCreateProxyByUniqueKey(const GrUniqueKey&,
+                                                       GrColorType,
+                                                       GrSurfaceOrigin,
+                                                       UseAllocator);
 
     bool instatiateProxy(GrSurfaceProxy*);
 
diff --git a/src/gpu/GrOpFlushState.cpp b/src/gpu/GrOpFlushState.cpp
index 2705adf..ba74b3e 100644
--- a/src/gpu/GrOpFlushState.cpp
+++ b/src/gpu/GrOpFlushState.cpp
@@ -23,8 +23,7 @@
         , fIndexPool(gpu, std::move(cpuBufferCache))
         , fGpu(gpu)
         , fResourceProvider(resourceProvider)
-        , fTokenTracker(tokenTracker)
-        , fDeinstantiateProxyTracker() {}
+        , fTokenTracker(tokenTracker) {}
 
 const GrCaps& GrOpFlushState::caps() const {
     return *fGpu->caps();
diff --git a/src/gpu/GrOpFlushState.h b/src/gpu/GrOpFlushState.h
index 09ac779..aa65733 100644
--- a/src/gpu/GrOpFlushState.h
+++ b/src/gpu/GrOpFlushState.h
@@ -14,7 +14,6 @@
 #include "src/gpu/GrAppliedClip.h"
 #include "src/gpu/GrBufferAllocPool.h"
 #include "src/gpu/GrDeferredUpload.h"
-#include "src/gpu/GrDeinstantiateProxyTracker.h"
 #include "src/gpu/GrRenderTargetProxy.h"
 #include "src/gpu/ops/GrMeshDrawOp.h"
 
@@ -80,9 +79,9 @@
     GrDeferredUploadToken addASAPUpload(GrDeferredTextureUploadFn&&) final;
 
     /** Overrides of GrMeshDrawOp::Target. */
-    void recordDraw(
-            sk_sp<const GrGeometryProcessor>, const GrMesh[], int meshCnt,
-            const GrPipeline::FixedDynamicState*, const GrPipeline::DynamicStateArrays*) final;
+    void recordDraw(sk_sp<const GrGeometryProcessor>, const GrMesh[], int meshCnt,
+                    const GrPipeline::FixedDynamicState*,
+                    const GrPipeline::DynamicStateArrays*) final;
     void* makeVertexSpace(size_t vertexSize, int vertexCount, sk_sp<const GrBuffer>*,
                           int* startVertex) final;
     uint16_t* makeIndexSpace(int indexCount, sk_sp<const GrBuffer>*, int* startIndex) final;
@@ -108,12 +107,10 @@
     // permissible).
     GrAtlasManager* atlasManager() const final;
 
-    GrDeinstantiateProxyTracker* deinstantiateProxyTracker() { return &fDeinstantiateProxyTracker; }
-
     /** GrMeshDrawOp::Target override. */
     SkArenaAlloc* allocator() override { return &fArena; }
-private:
 
+private:
     struct InlineUpload {
         InlineUpload(GrDeferredTextureUploadFn&& upload, GrDeferredUploadToken token)
                 : fUpload(std::move(upload)), fUploadBeforeToken(token) {}
@@ -163,9 +160,6 @@
     // Variables that are used to track where we are in lists as ops are executed
     SkArenaAllocList<Draw>::Iter fCurrDraw;
     SkArenaAllocList<InlineUpload>::Iter fCurrUpload;
-
-    // Used to track the proxies that need to be deinstantiated after we finish a flush
-    GrDeinstantiateProxyTracker fDeinstantiateProxyTracker;
 };
 
 #endif
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 9dd6393..f65ad6f 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -158,7 +158,7 @@
         return nullptr;
     }
 
-    return this->createWrapped(std::move(tex), colorType, origin);
+    return this->createWrapped(std::move(tex), colorType, origin, UseAllocator::kYes);
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::testingOnly_createInstantiatedProxy(
@@ -185,12 +185,14 @@
 sk_sp<GrTextureProxy> GrProxyProvider::testingOnly_createWrapped(sk_sp<GrTexture> tex,
                                                                  GrColorType colorType,
                                                                  GrSurfaceOrigin origin) {
-    return this->createWrapped(std::move(tex), colorType, origin);
+    return this->createWrapped(std::move(tex), colorType, origin, UseAllocator::kYes);
 }
 #endif
 
-sk_sp<GrTextureProxy> GrProxyProvider::createWrapped(sk_sp<GrTexture> tex, GrColorType colorType,
-                                                     GrSurfaceOrigin origin) {
+sk_sp<GrTextureProxy> GrProxyProvider::createWrapped(sk_sp<GrTexture> tex,
+                                                     GrColorType colorType,
+                                                     GrSurfaceOrigin origin,
+                                                     UseAllocator useAllocator) {
 #ifdef SK_DEBUG
     if (tex->getUniqueKey().isValid()) {
         SkASSERT(!this->findProxyByUniqueKey(tex->getUniqueKey(), origin));
@@ -200,16 +202,18 @@
 
     if (tex->asRenderTarget()) {
         GrSwizzle outSwizzle = this->caps()->getOutputSwizzle(tex->backendFormat(), colorType);
-        return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(std::move(tex), origin,
-                                                                    texSwizzle, outSwizzle));
+        return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
+                std::move(tex), origin, texSwizzle, outSwizzle, useAllocator));
     } else {
-        return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(tex), origin, texSwizzle));
+        return sk_sp<GrTextureProxy>(
+                new GrTextureProxy(std::move(tex), origin, texSwizzle, useAllocator));
     }
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::findOrCreateProxyByUniqueKey(const GrUniqueKey& key,
                                                                     GrColorType colorType,
-                                                                    GrSurfaceOrigin origin) {
+                                                                    GrSurfaceOrigin origin,
+                                                                    UseAllocator useAllocator) {
     ASSERT_SINGLE_OWNER
 
     if (this->isAbandoned()) {
@@ -236,7 +240,7 @@
     sk_sp<GrTexture> texture(static_cast<GrSurface*>(resource)->asTexture());
     SkASSERT(texture);
 
-    result = this->createWrapped(std::move(texture), colorType, origin);
+    result = this->createWrapped(std::move(texture), colorType, origin, useAllocator);
     SkASSERT(result->getUniqueKey() == key);
     // createWrapped should've added this for us
     SkASSERT(fUniquelyKeyedProxies.find(key));
@@ -294,12 +298,13 @@
                 SkAssertResult(srcImage->peekPixels(&pixMap));
                 GrMipLevel mipLevel = { pixMap.addr(), pixMap.rowBytes() };
 
-                return LazyInstantiationResult(resourceProvider->createTexture(
+                return LazyCallbackResult(resourceProvider->createTexture(
                         desc, format, GrRenderable::kNo, sampleCnt, budgeted, fit, GrProtected::kNo,
                         ct, mipLevel, GrResourceProvider::Flags::kNoPendingIO));
             },
             format, desc, GrRenderable::kNo, sampleCnt, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
-            GrMipMapsStatus::kNotAllocated, surfaceFlags, fit, budgeted, GrProtected::kNo);
+            GrMipMapsStatus::kNotAllocated, surfaceFlags, fit, budgeted, GrProtected::kNo,
+            UseAllocator::kYes);
 
     if (!proxy) {
         return nullptr;
@@ -321,24 +326,6 @@
     return proxy;
 }
 
-sk_sp<GrTextureProxy> GrProxyProvider::createMipMapProxy(const GrBackendFormat& format,
-                                                         const GrSurfaceDesc& desc,
-                                                         GrRenderable renderable,
-                                                         int renderTargetSampleCnt,
-                                                         GrSurfaceOrigin origin,
-                                                         SkBudgeted budgeted,
-                                                         GrProtected isProtected) {
-    ASSERT_SINGLE_OWNER
-
-    if (this->isAbandoned()) {
-        return nullptr;
-    }
-
-    return this->createProxy(format, desc, renderable, renderTargetSampleCnt, origin,
-                             GrMipMapped::kYes, SkBackingFit::kExact, budgeted, isProtected,
-                             GrInternalSurfaceFlags::kNone);
-}
-
 sk_sp<GrTextureProxy> GrProxyProvider::createProxyFromBitmap(const SkBitmap& bitmap,
                                                              GrMipMapped mipMapped) {
     ASSERT_SINGLE_OWNER
@@ -421,12 +408,13 @@
                     SkASSERT(texels[i].fPixels);
                 }
 
-                return LazyInstantiationResult(resourceProvider->createTexture(
+                return LazyCallbackResult(resourceProvider->createTexture(
                         desc, format, GrRenderable::kNo, 1, SkBudgeted::kYes, GrProtected::kNo,
                         texels.get(), mipLevelCount));
             },
             format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kYes,
-            GrMipMapsStatus::kValid, SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo);
+            GrMipMapsStatus::kValid, GrInternalSurfaceFlags::kNone, SkBackingFit::kExact,
+            SkBudgeted::kYes, GrProtected::kNo, UseAllocator::kYes);
 
     if (!proxy) {
         return nullptr;
@@ -471,7 +459,8 @@
                                                    SkBackingFit fit,
                                                    SkBudgeted budgeted,
                                                    GrProtected isProtected,
-                                                   GrInternalSurfaceFlags surfaceFlags) {
+                                                   GrInternalSurfaceFlags surfaceFlags,
+                                                   GrSurfaceProxy::UseAllocator useAllocator) {
     const GrCaps* caps = this->caps();
 
     if (caps->isFormatCompressed(format)) {
@@ -515,12 +504,12 @@
         GrSwizzle outSwizzle = caps->getOutputSwizzle(format, colorType);
         return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
                 *caps, format, copyDesc, renderTargetSampleCnt, origin, mipMapped, mipMapsStatus,
-                texSwizzle, outSwizzle, fit, budgeted, isProtected, surfaceFlags));
+                texSwizzle, outSwizzle, fit, budgeted, isProtected, surfaceFlags, useAllocator));
     }
 
-    return sk_sp<GrTextureProxy>(new GrTextureProxy(
-            format, copyDesc, origin, mipMapped, mipMapsStatus, texSwizzle, fit, budgeted,
-            isProtected, surfaceFlags));
+    return sk_sp<GrTextureProxy>(new GrTextureProxy(format, copyDesc, origin, mipMapped,
+                                                    mipMapsStatus, texSwizzle, fit, budgeted,
+                                                    isProtected, surfaceFlags, useAllocator));
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::createCompressedTextureProxy(
@@ -539,14 +528,14 @@
     }
 
     sk_sp<GrTextureProxy> proxy = this->createLazyProxy(
-            [width, height, format, compressionType, budgeted, data]
-            (GrResourceProvider* resourceProvider) {
-                return LazyInstantiationResult(resourceProvider->createCompressedTexture(
+            [width, height, format, compressionType, budgeted,
+             data](GrResourceProvider* resourceProvider) {
+                return LazyCallbackResult(resourceProvider->createCompressedTexture(
                         width, height, format, compressionType, budgeted, data.get()));
             },
             format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
-            GrMipMapsStatus::kNotAllocated, SkBackingFit::kExact, SkBudgeted::kYes,
-            GrProtected::kNo);
+            GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags::kNone, SkBackingFit::kExact,
+            SkBudgeted::kYes, GrProtected::kNo, UseAllocator::kYes);
 
     if (!proxy) {
         return nullptr;
@@ -606,7 +595,8 @@
 
     GrSwizzle texSwizzle = caps->getTextureSwizzle(tex->backendFormat(), grColorType);
 
-    return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(tex), origin, texSwizzle));
+    return sk_sp<GrTextureProxy>(
+            new GrTextureProxy(std::move(tex), origin, texSwizzle, UseAllocator::kNo));
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::wrapRenderableBackendTexture(
@@ -656,7 +646,7 @@
     GrSwizzle outSwizzle = caps->getOutputSwizzle(tex->backendFormat(), colorType);
 
     return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(std::move(tex), origin, texSwizzle,
-                                                                outSwizzle));
+                                                                outSwizzle, UseAllocator::kNo));
 }
 
 sk_sp<GrSurfaceProxy> GrProxyProvider::wrapBackendRenderTarget(
@@ -696,7 +686,7 @@
     GrSwizzle outSwizzle = caps->getOutputSwizzle(rt->backendFormat(), grColorType);
 
     return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(std::move(rt), origin, texSwizzle,
-                                                              outSwizzle));
+                                                              outSwizzle, UseAllocator::kNo));
 }
 
 sk_sp<GrSurfaceProxy> GrProxyProvider::wrapBackendTextureAsRenderTarget(
@@ -732,7 +722,7 @@
     GrSwizzle outSwizzle = caps->getOutputSwizzle(rt->backendFormat(), grColorType);
 
     return sk_sp<GrSurfaceProxy>(new GrRenderTargetProxy(std::move(rt), origin, texSwizzle,
-                                                         outSwizzle));
+                                                         outSwizzle, UseAllocator::kNo));
 }
 
 sk_sp<GrRenderTargetProxy> GrProxyProvider::wrapVulkanSecondaryCBAsRenderTarget(
@@ -770,46 +760,9 @@
     }
 
     // All Vulkan surfaces uses top left origins.
-    return sk_sp<GrRenderTargetProxy>(
-            new GrRenderTargetProxy(std::move(rt),
-                                    kTopLeft_GrSurfaceOrigin, texSwizzle, outSwizzle,
-                                    GrRenderTargetProxy::WrapsVkSecondaryCB::kYes));
-}
-
-sk_sp<GrTextureProxy> GrProxyProvider::createLazyProxy(LazyInstantiateCallback&& callback,
-                                                       const GrBackendFormat& format,
-                                                       const GrSurfaceDesc& desc,
-                                                       GrRenderable renderable,
-                                                       int renderTargetSampleCnt,
-                                                       GrSurfaceOrigin origin,
-                                                       GrMipMapped mipMapped,
-                                                       GrMipMapsStatus mipMapsStatus,
-                                                       SkBackingFit fit,
-                                                       SkBudgeted budgeted,
-                                                       GrProtected isProtected) {
-    return this->createLazyProxy(std::move(callback), format, desc, renderable,
-                                 renderTargetSampleCnt, origin, mipMapped, mipMapsStatus,
-                                 GrInternalSurfaceFlags::kNone, fit, budgeted, isProtected);
-}
-
-sk_sp<GrTextureProxy> GrProxyProvider::createLazyProxy(LazyInstantiateCallback&& callback,
-                                                       const GrBackendFormat& format,
-                                                       const GrSurfaceDesc& desc,
-                                                       GrRenderable renderable,
-                                                       int renderTargetSampleCnt,
-                                                       GrSurfaceOrigin origin,
-                                                       GrMipMapped mipMapped,
-                                                       GrMipMapsStatus mipMapsStatus,
-                                                       GrInternalSurfaceFlags surfaceFlags,
-                                                       SkBackingFit fit,
-                                                       SkBudgeted budgeted,
-                                                       GrProtected isProtected) {
-    // For non-ddl draws always make lazy proxy's single use.
-    LazyInstantiationType lazyType = this->renderingDirectly() ? LazyInstantiationType::kSingleUse
-                                                               : LazyInstantiationType::kMultipleUse;
-    return this->createLazyProxy(std::move(callback), format, desc, renderable,
-                                 renderTargetSampleCnt, origin, mipMapped, mipMapsStatus,
-                                 surfaceFlags, fit, budgeted, isProtected, lazyType);
+    return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(
+            std::move(rt), kTopLeft_GrSurfaceOrigin, texSwizzle, outSwizzle, UseAllocator::kNo,
+            GrRenderTargetProxy::WrapsVkSecondaryCB::kYes));
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::createLazyProxy(LazyInstantiateCallback&& callback,
@@ -824,7 +777,7 @@
                                                        SkBackingFit fit,
                                                        SkBudgeted budgeted,
                                                        GrProtected isProtected,
-                                                       LazyInstantiationType lazyType) {
+                                                       GrSurfaceProxy::UseAllocator useAllocator) {
     SkASSERT((desc.fWidth <= 0 && desc.fHeight <= 0) ||
              (desc.fWidth > 0 && desc.fHeight > 0));
 
@@ -843,22 +796,52 @@
     GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(format, colorType);
     GrSwizzle outSwizzle = this->caps()->getOutputSwizzle(format, colorType);
 
-    return sk_sp<GrTextureProxy>((renderable == GrRenderable::kYes)
-            ? new GrTextureRenderTargetProxy(
-                    *this->caps(), std::move(callback), lazyType, format, desc,
-                    renderTargetSampleCnt, origin, mipMapped, mipMapsStatus, texSwizzle, outSwizzle,
-                    fit, budgeted, isProtected, surfaceFlags)
-            : new GrTextureProxy(
-                    std::move(callback), lazyType, format, desc, origin, mipMapped, mipMapsStatus,
-                    texSwizzle, fit, budgeted, isProtected, surfaceFlags));
+    if (renderable == GrRenderable::kYes) {
+        return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(*this->caps(),
+                                                                    std::move(callback),
+                                                                    format,
+                                                                    desc,
+                                                                    renderTargetSampleCnt,
+                                                                    origin,
+                                                                    mipMapped,
+                                                                    mipMapsStatus,
+                                                                    texSwizzle,
+                                                                    outSwizzle,
+                                                                    fit,
+                                                                    budgeted,
+                                                                    isProtected,
+                                                                    surfaceFlags,
+                                                                    useAllocator));
+    } else {
+        return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(callback),
+                                                        format,
+                                                        desc,
+                                                        origin,
+                                                        mipMapped,
+                                                        mipMapsStatus,
+                                                        texSwizzle,
+                                                        fit,
+                                                        budgeted,
+                                                        isProtected,
+                                                        surfaceFlags,
+                                                        useAllocator));
+    }
 }
 
 sk_sp<GrRenderTargetProxy> GrProxyProvider::createLazyRenderTargetProxy(
-        LazyInstantiateCallback&& callback, const GrBackendFormat& format,
-        const GrSurfaceDesc& desc, int sampleCnt, GrSurfaceOrigin origin,
-        GrInternalSurfaceFlags surfaceFlags, const TextureInfo* textureInfo,
-        GrMipMapsStatus mipMapsStatus, SkBackingFit fit, SkBudgeted budgeted,
-        GrProtected isProtected, bool wrapsVkSecondaryCB) {
+        LazyInstantiateCallback&& callback,
+        const GrBackendFormat& format,
+        const GrSurfaceDesc& desc,
+        int sampleCnt,
+        GrSurfaceOrigin origin,
+        GrInternalSurfaceFlags surfaceFlags,
+        const TextureInfo* textureInfo,
+        GrMipMapsStatus mipMapsStatus,
+        SkBackingFit fit,
+        SkBudgeted budgeted,
+        GrProtected isProtected,
+        bool wrapsVkSecondaryCB,
+        UseAllocator useAllocator) {
     SkASSERT((desc.fWidth <= 0 && desc.fHeight <= 0) ||
              (desc.fWidth > 0 && desc.fHeight > 0));
 
@@ -869,11 +852,6 @@
 
     SkASSERT(validate_backend_format_and_config(this->caps(), format, desc.fConfig));
 
-    using LazyInstantiationType = GrSurfaceProxy::LazyInstantiationType;
-    // For non-ddl draws always make lazy proxy's single use.
-    LazyInstantiationType lazyType = this->renderingDirectly() ? LazyInstantiationType::kSingleUse
-                                                               : LazyInstantiationType::kMultipleUse;
-
     GrColorType colorType = GrPixelConfigToColorType(desc.fConfig);
     GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(format, colorType);
     GrSwizzle outSwizzle = this->caps()->getOutputSwizzle(format, colorType);
@@ -883,9 +861,9 @@
         // actual VkImage to texture from.
         SkASSERT(!wrapsVkSecondaryCB);
         return sk_sp<GrRenderTargetProxy>(new GrTextureRenderTargetProxy(
-                *this->caps(), std::move(callback), lazyType, format, desc, sampleCnt, origin,
+                *this->caps(), std::move(callback), format, desc, sampleCnt, origin,
                 textureInfo->fMipMapped, mipMapsStatus, texSwizzle, outSwizzle, fit, budgeted,
-                isProtected, surfaceFlags));
+                isProtected, surfaceFlags, useAllocator));
     }
 
     GrRenderTargetProxy::WrapsVkSecondaryCB vkSCB =
@@ -893,14 +871,19 @@
                                : GrRenderTargetProxy::WrapsVkSecondaryCB::kNo;
 
     return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(
-            std::move(callback), lazyType, format, desc, sampleCnt, origin, texSwizzle, outSwizzle,
-            fit, budgeted, isProtected, surfaceFlags, vkSCB));
+            std::move(callback), format, desc, sampleCnt, origin, texSwizzle, outSwizzle, fit,
+            budgeted, isProtected, surfaceFlags, useAllocator, vkSCB));
 }
 
-sk_sp<GrTextureProxy> GrProxyProvider::MakeFullyLazyProxy(
-        LazyInstantiateCallback&& callback, const GrBackendFormat& format, GrRenderable renderable,
-        int renderTargetSampleCnt, GrProtected isProtected, GrSurfaceOrigin origin,
-        GrPixelConfig config, const GrCaps& caps) {
+sk_sp<GrTextureProxy> GrProxyProvider::MakeFullyLazyProxy(LazyInstantiateCallback&& callback,
+                                                          const GrBackendFormat& format,
+                                                          GrRenderable renderable,
+                                                          int renderTargetSampleCnt,
+                                                          GrProtected isProtected,
+                                                          GrSurfaceOrigin origin,
+                                                          GrPixelConfig config,
+                                                          const GrCaps& caps,
+                                                          UseAllocator useAllocator) {
     if (!format.isValid()) {
         return nullptr;
     }
@@ -917,16 +900,17 @@
     GrSwizzle texSwizzle = caps.getTextureSwizzle(format, colorType);
     GrSwizzle outSwizzle = caps.getOutputSwizzle(format, colorType);
 
-    return sk_sp<GrTextureProxy>((GrRenderable::kYes == renderable)
-            ? new GrTextureRenderTargetProxy(
-                    caps, std::move(callback), LazyInstantiationType::kSingleUse, format, desc,
-                    renderTargetSampleCnt, origin, GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated,
-                    texSwizzle, outSwizzle, SkBackingFit::kApprox, SkBudgeted::kYes, isProtected,
-                    surfaceFlags)
-            : new GrTextureProxy(
-                    std::move(callback), LazyInstantiationType::kSingleUse, format, desc, origin,
-                    GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated, texSwizzle,
-                    SkBackingFit::kApprox, SkBudgeted::kYes, isProtected, surfaceFlags));
+    if (GrRenderable::kYes == renderable) {
+        return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
+                caps, std::move(callback), format, desc, renderTargetSampleCnt, origin,
+                GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated, texSwizzle, outSwizzle,
+                SkBackingFit::kApprox, SkBudgeted::kYes, isProtected, surfaceFlags, useAllocator));
+    } else {
+        return sk_sp<GrTextureProxy>(new GrTextureProxy(
+                std::move(callback), format, desc, origin, GrMipMapped::kNo,
+                GrMipMapsStatus::kNotAllocated, texSwizzle, SkBackingFit::kApprox, SkBudgeted::kYes,
+                isProtected, surfaceFlags, useAllocator));
+    }
 }
 
 bool GrProxyProvider::IsFunctionallyExact(GrSurfaceProxy* proxy) {
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h
index 7c2fa25..b8de8c8 100644
--- a/src/gpu/GrProxyProvider.h
+++ b/src/gpu/GrProxyProvider.h
@@ -23,6 +23,8 @@
  */
 class GrProxyProvider {
 public:
+    using UseAllocator = GrSurfaceProxy::UseAllocator;
+
     GrProxyProvider(GrImageContext*);
 
     ~GrProxyProvider();
@@ -56,8 +58,10 @@
      * each call that might result in a cache hit must provide the same colorType as the call that
      * caused a cache miss and created the proxy.
      */
-    sk_sp<GrTextureProxy> findOrCreateProxyByUniqueKey(const GrUniqueKey&, GrColorType colorType,
-                                                       GrSurfaceOrigin);
+    sk_sp<GrTextureProxy> findOrCreateProxyByUniqueKey(const GrUniqueKey&,
+                                                       GrColorType colorType,
+                                                       GrSurfaceOrigin,
+                                                       UseAllocator = UseAllocator::kYes);
 
     /*
      * Create an un-mipmapped texture proxy with data. The SkImage must be a raster backend image.
@@ -69,17 +73,6 @@
             GrInternalSurfaceFlags = GrInternalSurfaceFlags::kNone);
 
     /*
-     * Create a mipmapped texture proxy without any data.
-     *
-     * Like the call above but there are no texels to upload. A texture proxy is returned that
-     * simply has space allocated for the mips. We will allocated the full amount of mip levels
-     * based on the width and height in the GrSurfaceDesc.
-     */
-    sk_sp<GrTextureProxy> createMipMapProxy(const GrBackendFormat&, const GrSurfaceDesc&,
-                                            GrRenderable, int renderTargetSampleCnt,
-                                            GrSurfaceOrigin, SkBudgeted, GrProtected);
-
-    /*
      * Creates a new texture proxy for the bitmap, optionally with mip levels generated by the cpu.
      */
     sk_sp<GrTextureProxy> createProxyFromBitmap(const SkBitmap& bitmap, GrMipMapped);
@@ -87,19 +80,17 @@
     /*
      * Create a GrSurfaceProxy without any data.
      */
-    sk_sp<GrTextureProxy> createProxy(const GrBackendFormat&, const GrSurfaceDesc&, GrRenderable,
-                                      int renderTargetSampleCnt, GrSurfaceOrigin, GrMipMapped,
-                                      SkBackingFit, SkBudgeted, GrProtected,
-                                      GrInternalSurfaceFlags);
-
-    sk_sp<GrTextureProxy> createProxy(
-            const GrBackendFormat& format, const GrSurfaceDesc& desc, GrRenderable renderable,
-            int renderTargetSampleCnt, GrSurfaceOrigin origin, SkBackingFit fit,
-            SkBudgeted budgeted, GrProtected isProtected,
-            GrInternalSurfaceFlags surfaceFlags = GrInternalSurfaceFlags::kNone) {
-        return this->createProxy(format, desc, renderable, renderTargetSampleCnt, origin,
-                                 GrMipMapped::kNo, fit, budgeted, isProtected, surfaceFlags);
-    }
+    sk_sp<GrTextureProxy> createProxy(const GrBackendFormat&,
+                                      const GrSurfaceDesc&,
+                                      GrRenderable,
+                                      int renderTargetSampleCnt,
+                                      GrSurfaceOrigin,
+                                      GrMipMapped,
+                                      SkBackingFit,
+                                      SkBudgeted,
+                                      GrProtected,
+                                      GrInternalSurfaceFlags = GrInternalSurfaceFlags::kNone,
+                                      UseAllocator useAllocator = UseAllocator::kYes);
 
     /*
      * Create a texture proxy from compressed texture data.
@@ -148,7 +139,7 @@
                                                                    const GrVkDrawableInfo&);
 
     using LazyInstantiationKeyMode = GrSurfaceProxy::LazyInstantiationKeyMode;
-    using LazyInstantiationResult = GrSurfaceProxy::LazyInstantiationResult;
+    using LazyCallbackResult = GrSurfaceProxy::LazyCallbackResult;
     using LazyInstantiateCallback = GrSurfaceProxy::LazyInstantiateCallback;
 
     struct TextureInfo {
@@ -156,7 +147,6 @@
         GrTextureType fTextureType;
     };
 
-    using LazyInstantiationType = GrSurfaceProxy::LazyInstantiationType;
     /**
      * Creates a texture proxy that will be instantiated by a user-supplied callback during flush.
      * (Stencil is not supported by this method.) The width and height must either both be greater
@@ -167,23 +157,19 @@
      * It also must support being passed in a null GrResourceProvider. When this happens, the
      * callback should cleanup any resources it captured and return an empty sk_sp<GrTextureProxy>.
      */
-    sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrBackendFormat&,
-                                          const GrSurfaceDesc&, GrRenderable,
-                                          int renderTargetSampleCnt, GrSurfaceOrigin,
-                                          GrMipMapped, GrMipMapsStatus, GrInternalSurfaceFlags,
-                                          SkBackingFit, SkBudgeted, GrProtected,
-                                          LazyInstantiationType);
-
-    sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrBackendFormat&,
-                                          const GrSurfaceDesc&, GrRenderable,
-                                          int renderTargetSampleCnt, GrSurfaceOrigin, GrMipMapped,
-                                          GrMipMapsStatus, GrInternalSurfaceFlags, SkBackingFit,
-                                          SkBudgeted, GrProtected);
-
-    sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrBackendFormat&,
-                                          const GrSurfaceDesc&, GrRenderable,
-                                          int renderTargetSampleCnt, GrSurfaceOrigin, GrMipMapped,
-                                          GrMipMapsStatus, SkBackingFit, SkBudgeted, GrProtected);
+    sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&,
+                                          const GrBackendFormat&,
+                                          const GrSurfaceDesc&,
+                                          GrRenderable,
+                                          int renderTargetSampleCnt,
+                                          GrSurfaceOrigin,
+                                          GrMipMapped,
+                                          GrMipMapsStatus,
+                                          GrInternalSurfaceFlags,
+                                          SkBackingFit,
+                                          SkBudgeted,
+                                          GrProtected,
+                                          UseAllocator);
 
     /** A null TextureInfo indicates a non-textureable render target. */
     sk_sp<GrRenderTargetProxy> createLazyRenderTargetProxy(LazyInstantiateCallback&&,
@@ -192,18 +178,27 @@
                                                            int renderTargetSampleCnt,
                                                            GrSurfaceOrigin origin,
                                                            GrInternalSurfaceFlags,
-                                                           const TextureInfo*, GrMipMapsStatus,
-                                                           SkBackingFit, SkBudgeted, GrProtected,
-                                                           bool wrapsVkSecondaryCB);
+                                                           const TextureInfo*,
+                                                           GrMipMapsStatus,
+                                                           SkBackingFit,
+                                                           SkBudgeted,
+                                                           GrProtected,
+                                                           bool wrapsVkSecondaryCB,
+                                                           UseAllocator useAllocator);
 
     /**
      * Fully lazy proxies have unspecified width and height. Methods that rely on those values
      * (e.g., width, height, getBoundsRect) should be avoided.
      */
     static sk_sp<GrTextureProxy> MakeFullyLazyProxy(LazyInstantiateCallback&&,
-                                                    const GrBackendFormat&, GrRenderable,
-                                                    int renderTargetSampleCnt, GrProtected,
-                                                    GrSurfaceOrigin, GrPixelConfig, const GrCaps&);
+                                                    const GrBackendFormat&,
+                                                    GrRenderable,
+                                                    int renderTargetSampleCnt,
+                                                    GrProtected,
+                                                    GrSurfaceOrigin,
+                                                    GrPixelConfig,
+                                                    const GrCaps&,
+                                                    UseAllocator);
 
     // 'proxy' is about to be used as a texture src or drawn to. This query can be used to
     // determine if it is going to need a texture domain or a full clear.
@@ -281,7 +276,8 @@
     bool isAbandoned() const;
 
     // GrColorType is used to determine the proxy's texture swizzle.
-    sk_sp<GrTextureProxy> createWrapped(sk_sp<GrTexture> tex, GrColorType, GrSurfaceOrigin origin);
+    sk_sp<GrTextureProxy> createWrapped(sk_sp<GrTexture> tex, GrColorType, GrSurfaceOrigin origin,
+                                        UseAllocator useAllocator);
 
     struct UniquelyKeyedProxyHashTraits {
         static const GrUniqueKey& GetKey(const GrTextureProxy& p) { return p.getUniqueKey(); }
diff --git a/src/gpu/GrRecordingContext.cpp b/src/gpu/GrRecordingContext.cpp
index 9043f6a..081b693 100644
--- a/src/gpu/GrRecordingContext.cpp
+++ b/src/gpu/GrRecordingContext.cpp
@@ -190,14 +190,8 @@
     desc.fHeight = height;
     desc.fConfig = config;
 
-    sk_sp<GrTextureProxy> texture;
-    if (GrMipMapped::kNo == mipMapped) {
-        texture = this->proxyProvider()->createProxy(format, desc, GrRenderable::kNo, 1, origin,
-                                                     fit, budgeted, isProtected);
-    } else {
-        texture = this->proxyProvider()->createMipMapProxy(format, desc, GrRenderable::kNo, 1,
-                                                           origin, budgeted, isProtected);
-    }
+    sk_sp<GrTextureProxy> texture = this->proxyProvider()->createProxy(
+            format, desc, GrRenderable::kNo, 1, origin, mipMapped, fit, budgeted, isProtected);
     if (!texture) {
         return nullptr;
     }
@@ -239,14 +233,9 @@
     desc.fHeight = height;
     desc.fConfig = config;
 
-    sk_sp<GrTextureProxy> rtp;
-    if (GrMipMapped::kNo == mipMapped) {
-        rtp = this->proxyProvider()->createProxy(format, desc, GrRenderable::kYes, sampleCnt,
-                                                 origin, fit, budgeted, isProtected);
-    } else {
-        rtp = this->proxyProvider()->createMipMapProxy(format, desc, GrRenderable::kYes, sampleCnt,
-                                                       origin, budgeted, isProtected);
-    }
+    sk_sp<GrTextureProxy> rtp =
+            this->proxyProvider()->createProxy(format, desc, GrRenderable::kYes, sampleCnt, origin,
+                                               mipMapped, fit, budgeted, isProtected);
     if (!rtp) {
         return nullptr;
     }
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index 8faa0a4..38bc067 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -21,37 +21,52 @@
 // Deferred version
 // TODO: we can probably munge the 'desc' in both the wrapped and deferred
 // cases to make the sampleConfig/numSamples stuff more rational.
-GrRenderTargetProxy::GrRenderTargetProxy(const GrCaps& caps, const GrBackendFormat& format,
-                                         const GrSurfaceDesc& desc, int sampleCount,
-                                         GrSurfaceOrigin origin, const GrSwizzle& textureSwizzle,
-                                         const GrSwizzle& outputSwizzle, SkBackingFit fit,
-                                         SkBudgeted budgeted, GrProtected isProtected,
-                                         GrInternalSurfaceFlags surfaceFlags)
+GrRenderTargetProxy::GrRenderTargetProxy(const GrCaps& caps,
+                                         const GrBackendFormat& format,
+                                         const GrSurfaceDesc& desc,
+                                         int sampleCount,
+                                         GrSurfaceOrigin origin,
+                                         const GrSwizzle& textureSwizzle,
+                                         const GrSwizzle& outputSwizzle,
+                                         SkBackingFit fit,
+                                         SkBudgeted budgeted,
+                                         GrProtected isProtected,
+                                         GrInternalSurfaceFlags surfaceFlags,
+                                         UseAllocator useAllocator)
         : INHERITED(format, desc, GrRenderable::kYes, origin, textureSwizzle, fit, budgeted,
-                    isProtected, surfaceFlags)
+                    isProtected, surfaceFlags, useAllocator)
         , fSampleCnt(sampleCount)
         , fWrapsVkSecondaryCB(WrapsVkSecondaryCB::kNo)
         , fOutputSwizzle(outputSwizzle) {}
 
 // Lazy-callback version
-GrRenderTargetProxy::GrRenderTargetProxy(
-        LazyInstantiateCallback&& callback, LazyInstantiationType lazyType,
-        const GrBackendFormat& format, const GrSurfaceDesc& desc, int sampleCount,
-        GrSurfaceOrigin origin, const GrSwizzle& textureSwizzle, const GrSwizzle& outputSwizzle,
-        SkBackingFit fit, SkBudgeted budgeted, GrProtected isProtected,
-        GrInternalSurfaceFlags surfaceFlags, WrapsVkSecondaryCB wrapsVkSecondaryCB)
-        : INHERITED(std::move(callback), lazyType, format, desc, GrRenderable::kYes, origin,
-                    textureSwizzle, fit, budgeted, isProtected, surfaceFlags)
+GrRenderTargetProxy::GrRenderTargetProxy(LazyInstantiateCallback&& callback,
+                                         const GrBackendFormat& format,
+                                         const GrSurfaceDesc& desc,
+                                         int sampleCount,
+                                         GrSurfaceOrigin origin,
+                                         const GrSwizzle& textureSwizzle,
+                                         const GrSwizzle& outputSwizzle,
+                                         SkBackingFit fit,
+                                         SkBudgeted budgeted,
+                                         GrProtected isProtected,
+                                         GrInternalSurfaceFlags surfaceFlags,
+                                         UseAllocator useAllocator,
+                                         WrapsVkSecondaryCB wrapsVkSecondaryCB)
+        : INHERITED(std::move(callback), format, desc, GrRenderable::kYes, origin, textureSwizzle,
+                    fit, budgeted, isProtected, surfaceFlags, useAllocator)
         , fSampleCnt(sampleCount)
         , fWrapsVkSecondaryCB(wrapsVkSecondaryCB)
         , fOutputSwizzle(outputSwizzle) {}
 
 // Wrapped version
-GrRenderTargetProxy::GrRenderTargetProxy(sk_sp<GrSurface> surf, GrSurfaceOrigin origin,
+GrRenderTargetProxy::GrRenderTargetProxy(sk_sp<GrSurface> surf,
+                                         GrSurfaceOrigin origin,
                                          const GrSwizzle& textureSwizzle,
                                          const GrSwizzle& outputSwizzle,
+                                         UseAllocator useAllocator,
                                          WrapsVkSecondaryCB wrapsVkSecondaryCB)
-        : INHERITED(std::move(surf), origin, textureSwizzle, SkBackingFit::kExact)
+        : INHERITED(std::move(surf), origin, textureSwizzle, SkBackingFit::kExact, useAllocator)
         , fSampleCnt(fTarget->asRenderTarget()->numSamples())
         , fWrapsVkSecondaryCB(wrapsVkSecondaryCB)
         , fOutputSwizzle(outputSwizzle) {
@@ -71,7 +86,7 @@
 }
 
 bool GrRenderTargetProxy::instantiate(GrResourceProvider* resourceProvider) {
-    if (LazyState::kNot != this->lazyInstantiationState()) {
+    if (this->isLazy()) {
         return false;
     }
     if (!this->instantiateImpl(resourceProvider, fSampleCnt, fNumStencilSamples, GrRenderable::kYes,
diff --git a/src/gpu/GrRenderTargetProxy.h b/src/gpu/GrRenderTargetProxy.h
index 1d40efd..50ebcd7e 100644
--- a/src/gpu/GrRenderTargetProxy.h
+++ b/src/gpu/GrRenderTargetProxy.h
@@ -88,10 +88,18 @@
     friend class GrRenderTargetProxyPriv;
 
     // Deferred version
-    GrRenderTargetProxy(const GrCaps&, const GrBackendFormat&, const GrSurfaceDesc&,
-                        int sampleCount, GrSurfaceOrigin, const GrSwizzle& textureSwizzle,
-                        const GrSwizzle& outputSwizzle, SkBackingFit, SkBudgeted, GrProtected,
-                        GrInternalSurfaceFlags);
+    GrRenderTargetProxy(const GrCaps&,
+                        const GrBackendFormat&,
+                        const GrSurfaceDesc&,
+                        int sampleCount,
+                        GrSurfaceOrigin,
+                        const GrSwizzle& textureSwizzle,
+                        const GrSwizzle& outputSwizzle,
+                        SkBackingFit,
+                        SkBudgeted,
+                        GrProtected,
+                        GrInternalSurfaceFlags,
+                        UseAllocator);
 
     enum class WrapsVkSecondaryCB : bool { kNo = false, kYes = true };
 
@@ -105,16 +113,27 @@
     //
     // The minimal knowledge version is used for CCPR where we are generating an atlas but we do not
     // know the final size until flush time.
-    GrRenderTargetProxy(LazyInstantiateCallback&&, LazyInstantiationType lazyType,
-                        const GrBackendFormat&, const GrSurfaceDesc&, int sampleCount,
-                        GrSurfaceOrigin, const GrSwizzle& textureSwizzle,
-                        const GrSwizzle& outputSwizzle, SkBackingFit, SkBudgeted, GrProtected,
-                        GrInternalSurfaceFlags, WrapsVkSecondaryCB wrapsVkSecondaryCB);
+    GrRenderTargetProxy(LazyInstantiateCallback&&,
+                        const GrBackendFormat&,
+                        const GrSurfaceDesc&,
+                        int sampleCount,
+                        GrSurfaceOrigin,
+                        const GrSwizzle& textureSwizzle,
+                        const GrSwizzle& outputSwizzle,
+                        SkBackingFit,
+                        SkBudgeted,
+                        GrProtected,
+                        GrInternalSurfaceFlags,
+                        UseAllocator,
+                        WrapsVkSecondaryCB);
 
     // Wrapped version
-    GrRenderTargetProxy(sk_sp<GrSurface>, GrSurfaceOrigin, const GrSwizzle& textureSwizzle,
+    GrRenderTargetProxy(sk_sp<GrSurface>,
+                        GrSurfaceOrigin,
+                        const GrSwizzle& textureSwizzle,
                         const GrSwizzle& outputSwizzle,
-                        WrapsVkSecondaryCB wrapsVkSecondaryCB = WrapsVkSecondaryCB::kNo);
+                        UseAllocator,
+                        WrapsVkSecondaryCB = WrapsVkSecondaryCB::kNo);
 
     sk_sp<GrSurface> createSurface(GrResourceProvider*) const override;
 
diff --git a/src/gpu/GrResourceAllocator.cpp b/src/gpu/GrResourceAllocator.cpp
index c7b0b92..6ab2bf0 100644
--- a/src/gpu/GrResourceAllocator.cpp
+++ b/src/gpu/GrResourceAllocator.cpp
@@ -7,11 +7,9 @@
 
 #include "src/gpu/GrResourceAllocator.h"
 
-#include "src/gpu/GrDeinstantiateProxyTracker.h"
 #include "src/gpu/GrGpuResourcePriv.h"
 #include "src/gpu/GrOpsTask.h"
 #include "src/gpu/GrRenderTargetProxy.h"
-#include "src/gpu/GrResourceCache.h"
 #include "src/gpu/GrResourceProvider.h"
 #include "src/gpu/GrSurfacePriv.h"
 #include "src/gpu/GrSurfaceProxy.h"
@@ -75,14 +73,15 @@
 void GrResourceAllocator::addInterval(GrSurfaceProxy* proxy, unsigned int start, unsigned int end,
                                       ActualUse actualUse
                                       SkDEBUGCODE(, bool isDirectDstRead)) {
+    SkASSERT(start <= end);
+    SkASSERT(!fAssigned);  // We shouldn't be adding any intervals after (or during) assignment
 
     if (proxy->canSkipResourceAllocator()) {
         // If the proxy is still not instantiated at this point but will need stencil, it will
         // attach its own stencil buffer upon onFlush instantiation.
         if (proxy->isInstantiated()) {
-            int minStencilSampleCount = (proxy->asRenderTargetProxy())
-                    ? proxy->asRenderTargetProxy()->numStencilSamples()
-                    : 0;
+            auto rt = proxy->asRenderTargetProxy();
+            int minStencilSampleCount = rt ? rt->numStencilSamples() : 0;
             if (minStencilSampleCount) {
                 if (!GrSurfaceProxyPriv::AttachStencilIfNeeded(
                         fResourceProvider, proxy->peekSurface(), minStencilSampleCount)) {
@@ -94,74 +93,56 @@
         return;
     }
 
-    SkASSERT(!proxy->priv().ignoredByResourceAllocator());
-
-    SkASSERT(start <= end);
-    SkASSERT(!fAssigned);      // We shouldn't be adding any intervals after (or during) assignment
-
     // If a proxy is read only it must refer to a texture with specific content that cannot be
     // recycled. We don't need to assign a texture to it and no other proxy can be instantiated
     // with the same texture.
     if (proxy->readOnly()) {
-        // Since we aren't going to add an interval we won't revisit this proxy in assign(). So it
-        // must already be instantiated or it must be a lazy proxy that we will instantiate below.
-        SkASSERT(proxy->isInstantiated() ||
-                 GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState());
-    } else {
-        if (Interval* intvl = fIntvlHash.find(proxy->uniqueID().asUInt())) {
-            // Revise the interval for an existing use
-#ifdef SK_DEBUG
-            if (0 == start && 0 == end) {
-                // This interval is for the initial upload to a deferred proxy. Due to the vagaries
-                // of how deferred proxies are collected they can appear as uploads multiple times
-                // in a single opsTasks' list and as uploads in several opsTasks.
-                SkASSERT(0 == intvl->start());
-            } else if (isDirectDstRead) {
-                // Direct reads from the render target itself should occur w/in the existing
-                // interval
-                SkASSERT(intvl->start() <= start && intvl->end() >= end);
-            } else {
-                SkASSERT(intvl->end() <= start && intvl->end() <= end);
-            }
-#endif
-            if (ActualUse::kYes == actualUse) {
-                intvl->addUse();
-            }
-            intvl->extendEnd(end);
-            return;
-        }
-        Interval* newIntvl;
-        if (fFreeIntervalList) {
-            newIntvl = fFreeIntervalList;
-            fFreeIntervalList = newIntvl->next();
-            newIntvl->setNext(nullptr);
-            newIntvl->resetTo(proxy, start, end);
+        if (proxy->isLazy() && !proxy->priv().doLazyInstantiation(fResourceProvider)) {
+            fLazyInstantiationError = true;
         } else {
-            newIntvl = fIntervalAllocator.make<Interval>(proxy, start, end);
+            // Since we aren't going to add an interval we won't revisit this proxy in assign(). So
+            // must already be instantiated or it must be a lazy proxy that we instantiated above.
+            SkASSERT(proxy->isInstantiated());
         }
-
+        return;
+    }
+    if (Interval* intvl = fIntvlHash.find(proxy->uniqueID().asUInt())) {
+        // Revise the interval for an existing use
+#ifdef SK_DEBUG
+        if (0 == start && 0 == end) {
+            // This interval is for the initial upload to a deferred proxy. Due to the vagaries
+            // of how deferred proxies are collected they can appear as uploads multiple times
+            // in a single opsTasks' list and as uploads in several opsTasks.
+            SkASSERT(0 == intvl->start());
+        } else if (isDirectDstRead) {
+            // Direct reads from the render target itself should occur w/in the existing
+            // interval
+            SkASSERT(intvl->start() <= start && intvl->end() >= end);
+        } else {
+            SkASSERT(intvl->end() <= start && intvl->end() <= end);
+        }
+#endif
         if (ActualUse::kYes == actualUse) {
-            newIntvl->addUse();
+            intvl->addUse();
         }
-        fIntvlList.insertByIncreasingStart(newIntvl);
-        fIntvlHash.add(newIntvl);
+        intvl->extendEnd(end);
+        return;
+    }
+    Interval* newIntvl;
+    if (fFreeIntervalList) {
+        newIntvl = fFreeIntervalList;
+        fFreeIntervalList = newIntvl->next();
+        newIntvl->setNext(nullptr);
+        newIntvl->resetTo(proxy, start, end);
+    } else {
+        newIntvl = fIntervalAllocator.make<Interval>(proxy, start, end);
     }
 
-    // Because readOnly proxies do not get a usage interval we must instantiate them here (since it
-    // won't occur in GrResourceAllocator::assign)
-    if (proxy->readOnly()) {
-        // FIXME: remove this once we can do the lazy instantiation from assign instead.
-        if (GrSurfaceProxy::LazyState::kNot != proxy->lazyInstantiationState()) {
-            if (proxy->priv().doLazyInstantiation(fResourceProvider)) {
-                if (proxy->priv().lazyInstantiationType() ==
-                    GrSurfaceProxy::LazyInstantiationType::kDeinstantiate) {
-                    fDeinstantiateTracker->addProxy(proxy);
-                }
-            } else {
-                fLazyInstantiationError = true;
-            }
-        }
+    if (ActualUse::kYes == actualUse) {
+        newIntvl->addUse();
     }
+    fIntvlList.insertByIncreasingStart(newIntvl);
+    fIntvlHash.add(newIntvl);
 }
 
 GrResourceAllocator::Interval* GrResourceAllocator::IntervalList::popHead() {
@@ -448,17 +429,12 @@
             continue;
         }
 
-        if (GrSurfaceProxy::LazyState::kNot != cur->proxy()->lazyInstantiationState()) {
+        if (cur->proxy()->isLazy()) {
             if (!cur->proxy()->priv().doLazyInstantiation(fResourceProvider)) {
                 *outError = AssignError::kFailedProxyInstantiation;
-            } else {
-                if (GrSurfaceProxy::LazyInstantiationType::kDeinstantiate ==
-                    cur->proxy()->priv().lazyInstantiationType()) {
-                    fDeinstantiateTracker->addProxy(cur->proxy());
-                }
             }
-        } else if (sk_sp<GrSurface> surface = this->findSurfaceFor(
-                cur->proxy(), minStencilSampleCount)) {
+        } else if (sk_sp<GrSurface> surface =
+                           this->findSurfaceFor(cur->proxy(), minStencilSampleCount)) {
             // TODO: make getUniqueKey virtual on GrSurfaceProxy
             GrTextureProxy* texProxy = cur->proxy()->asTextureProxy();
 
diff --git a/src/gpu/GrResourceAllocator.h b/src/gpu/GrResourceAllocator.h
index 0dc7b46..6108b54 100644
--- a/src/gpu/GrResourceAllocator.h
+++ b/src/gpu/GrResourceAllocator.h
@@ -16,7 +16,6 @@
 #include "src/core/SkTDynamicHash.h"
 #include "src/core/SkTMultiMap.h"
 
-class GrDeinstantiateProxyTracker;
 class GrResourceProvider;
 
 // Print out explicit allocation information
@@ -68,13 +67,8 @@
  */
 class GrResourceAllocator {
 public:
-    GrResourceAllocator(GrResourceProvider* resourceProvider,
-                        GrDeinstantiateProxyTracker* tracker
-                        SkDEBUGCODE(, int numOpsTasks))
-            : fResourceProvider(resourceProvider)
-            , fDeinstantiateTracker(tracker)
-            SkDEBUGCODE(, fNumOpsTasks(numOpsTasks)) {
-    }
+    GrResourceAllocator(GrResourceProvider* resourceProvider SkDEBUGCODE(, int numOpsTasks))
+            : fResourceProvider(resourceProvider) SkDEBUGCODE(, fNumOpsTasks(numOpsTasks)) {}
 
     ~GrResourceAllocator();
 
@@ -261,7 +255,6 @@
     static const int kInitialArenaSize = 128 * sizeof(Interval);
 
     GrResourceProvider*          fResourceProvider;
-    GrDeinstantiateProxyTracker* fDeinstantiateTracker;
     FreePoolMultiMap             fFreePool;          // Recently created/used GrSurfaces
     IntvlHash                    fIntvlHash;         // All the intervals, hashed by proxyID
 
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index aae0171..b1e5056 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -185,8 +185,8 @@
         return nullptr;
     }
 
-    sk_sp<GrTextureProxy> proxy =
-            proxyProvider->createWrapped(tex, srcColorType, kTopLeft_GrSurfaceOrigin);
+    sk_sp<GrTextureProxy> proxy = proxyProvider->createWrapped(
+            tex, srcColorType, kTopLeft_GrSurfaceOrigin, GrSurfaceProxy::UseAllocator::kYes);
     if (!proxy) {
         return nullptr;
     }
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 2bfa17a..963dece 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -185,7 +185,7 @@
                                                                  GrRenderable::kNo);
 
     return proxyProvider->createProxy(format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin,
-                                      fit, SkBudgeted::kYes, GrProtected::kNo);
+                                      GrMipMapped::kNo, fit, SkBudgeted::kYes, GrProtected::kNo);
 }
 
 namespace {
diff --git a/src/gpu/GrSurfaceContext.cpp b/src/gpu/GrSurfaceContext.cpp
index 3a4726b..2ccd8b7 100644
--- a/src/gpu/GrSurfaceContext.cpp
+++ b/src/gpu/GrSurfaceContext.cpp
@@ -313,8 +313,8 @@
         GrSurfaceOrigin tempOrigin =
                 this->asRenderTargetContext() ? kTopLeft_GrSurfaceOrigin : dstProxy->origin();
         auto tempProxy = direct->priv().proxyProvider()->createProxy(
-                format, desc, GrRenderable::kNo, 1, tempOrigin, SkBackingFit::kApprox,
-                SkBudgeted::kYes, GrProtected::kNo);
+                format, desc, GrRenderable::kNo, 1, tempOrigin, GrMipMapped::kNo,
+                SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
 
         if (!tempProxy) {
             return false;
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 484087b..a6f595d 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -49,13 +49,17 @@
 }
 #endif
 
-// Lazy-callback version
-GrSurfaceProxy::GrSurfaceProxy(LazyInstantiateCallback&& callback, LazyInstantiationType lazyType,
-                               const GrBackendFormat& format, const GrSurfaceDesc& desc,
-                               GrRenderable renderable, GrSurfaceOrigin origin,
-                               const GrSwizzle& textureSwizzle, SkBackingFit fit,
-                               SkBudgeted budgeted, GrProtected isProtected,
-                               GrInternalSurfaceFlags surfaceFlags)
+// Deferred version
+GrSurfaceProxy::GrSurfaceProxy(const GrBackendFormat& format,
+                               const GrSurfaceDesc& desc,
+                               GrRenderable renderable,
+                               GrSurfaceOrigin origin,
+                               const GrSwizzle& textureSwizzle,
+                               SkBackingFit fit,
+                               SkBudgeted budgeted,
+                               GrProtected isProtected,
+                               GrInternalSurfaceFlags surfaceFlags,
+                               UseAllocator useAllocator)
         : fSurfaceFlags(surfaceFlags)
         , fFormat(format)
         , fConfig(desc.fConfig)
@@ -65,19 +69,45 @@
         , fTextureSwizzle(textureSwizzle)
         , fFit(fit)
         , fBudgeted(budgeted)
-        , fLazyInstantiateCallback(std::move(callback))
-        , fLazyInstantiationType(lazyType)
+        , fUseAllocator(useAllocator)
         , fIsProtected(isProtected)
-        , fGpuMemorySize(kInvalidGpuMemorySize)
-        , fLastRenderTask(nullptr) {
+        , fGpuMemorySize(kInvalidGpuMemorySize) {
     SkASSERT(fFormat.isValid());
-    // NOTE: the default fUniqueID ctor pulls a value from the same pool as the GrGpuResources.
-    if (fLazyInstantiateCallback) {
-        SkASSERT(is_valid_fully_lazy(desc, fit) || is_valid_partially_lazy(desc));
-    } else {
-        SkASSERT(is_valid_non_lazy(desc));
+    SkASSERT(is_valid_non_lazy(desc));
+    if (GrPixelConfigIsCompressed(desc.fConfig)) {
+        SkASSERT(renderable == GrRenderable::kNo);
+        fSurfaceFlags |= GrInternalSurfaceFlags::kReadOnly;
     }
+}
 
+// Lazy-callback version
+GrSurfaceProxy::GrSurfaceProxy(LazyInstantiateCallback&& callback,
+                               const GrBackendFormat& format,
+                               const GrSurfaceDesc& desc,
+                               GrRenderable renderable,
+                               GrSurfaceOrigin origin,
+                               const GrSwizzle& textureSwizzle,
+                               SkBackingFit fit,
+                               SkBudgeted budgeted,
+                               GrProtected isProtected,
+                               GrInternalSurfaceFlags surfaceFlags,
+                               UseAllocator useAllocator)
+        : fSurfaceFlags(surfaceFlags)
+        , fFormat(format)
+        , fConfig(desc.fConfig)
+        , fWidth(desc.fWidth)
+        , fHeight(desc.fHeight)
+        , fOrigin(origin)
+        , fTextureSwizzle(textureSwizzle)
+        , fFit(fit)
+        , fBudgeted(budgeted)
+        , fUseAllocator(useAllocator)
+        , fLazyInstantiateCallback(std::move(callback))
+        , fIsProtected(isProtected)
+        , fGpuMemorySize(kInvalidGpuMemorySize) {
+    SkASSERT(fFormat.isValid());
+    SkASSERT(fLazyInstantiateCallback);
+    SkASSERT(is_valid_fully_lazy(desc, fit) || is_valid_partially_lazy(desc));
     if (GrPixelConfigIsCompressed(desc.fConfig)) {
         SkASSERT(renderable == GrRenderable::kNo);
         fSurfaceFlags |= GrInternalSurfaceFlags::kReadOnly;
@@ -85,8 +115,11 @@
 }
 
 // Wrapped version
-GrSurfaceProxy::GrSurfaceProxy(sk_sp<GrSurface> surface, GrSurfaceOrigin origin,
-                               const GrSwizzle& textureSwizzle, SkBackingFit fit)
+GrSurfaceProxy::GrSurfaceProxy(sk_sp<GrSurface> surface,
+                               GrSurfaceOrigin origin,
+                               const GrSwizzle& textureSwizzle,
+                               SkBackingFit fit,
+                               UseAllocator useAllocator)
         : fTarget(std::move(surface))
         , fSurfaceFlags(fTarget->surfacePriv().flags())
         , fFormat(fTarget->backendFormat())
@@ -99,10 +132,10 @@
         , fBudgeted(fTarget->resourcePriv().budgetedType() == GrBudgetedType::kBudgeted
                             ? SkBudgeted::kYes
                             : SkBudgeted::kNo)
+        , fUseAllocator(useAllocator)
         , fUniqueID(fTarget->uniqueID())  // Note: converting from unique resource ID to a proxy ID!
         , fIsProtected(fTarget->isProtected() ? GrProtected::kYes : GrProtected::kNo)
-        , fGpuMemorySize(kInvalidGpuMemorySize)
-        , fLastRenderTask(nullptr) {
+        , fGpuMemorySize(kInvalidGpuMemorySize) {
     SkASSERT(fFormat.isValid());
 }
 
@@ -134,7 +167,7 @@
                                                    int minStencilSampleCount,
                                                    GrRenderable renderable,
                                                    GrMipMapped mipMapped) const {
-    SkASSERT(GrSurfaceProxy::LazyState::kNot == this->lazyInstantiationState());
+    SkASSERT(!this->isLazy());
     SkASSERT(!fTarget);
     GrSurfaceDesc desc;
     desc.fWidth = fWidth;
@@ -198,7 +231,7 @@
 }
 
 bool GrSurfaceProxy::canSkipResourceAllocator() const {
-    if (this->ignoredByResourceAllocator()) {
+    if (fUseAllocator == UseAllocator::kNo) {
         // Usually an atlas or onFlush proxy
         return true;
     }
@@ -238,7 +271,7 @@
 bool GrSurfaceProxy::instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt,
                                      int minStencilSampleCount, GrRenderable renderable,
                                      GrMipMapped mipMapped, const GrUniqueKey* uniqueKey) {
-    SkASSERT(LazyState::kNot == this->lazyInstantiationState());
+    SkASSERT(!this->isLazy());
     if (fTarget) {
         if (uniqueKey && uniqueKey->isValid()) {
             SkASSERT(fTarget->getUniqueKey().isValid() && fTarget->getUniqueKey() == *uniqueKey);
@@ -270,7 +303,7 @@
 }
 
 void GrSurfaceProxy::computeScratchKey(GrScratchKey* key) const {
-    SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+    SkASSERT(!this->isFullyLazy());
     GrRenderable renderable = GrRenderable::kNo;
     int sampleCount = 1;
     if (const auto* rtp = this->asRenderTargetProxy()) {
@@ -307,7 +340,7 @@
 }
 
 int GrSurfaceProxy::worstCaseWidth() const {
-    SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+    SkASSERT(!this->isFullyLazy());
     if (fTarget) {
         return fTarget->width();
     }
@@ -319,7 +352,7 @@
 }
 
 int GrSurfaceProxy::worstCaseHeight() const {
-    SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+    SkASSERT(!this->isFullyLazy());
     if (fTarget) {
         return fTarget->height();
     }
@@ -345,7 +378,7 @@
                                            SkBackingFit fit,
                                            SkBudgeted budgeted,
                                            RectsMustMatch rectsMustMatch) {
-    SkASSERT(LazyState::kFully != src->lazyInstantiationState());
+    SkASSERT(!src->isFullyLazy());
     GrProtected isProtected = src->isProtected() ? GrProtected::kYes : GrProtected::kNo;
     int width;
     int height;
@@ -392,7 +425,7 @@
 sk_sp<GrTextureProxy> GrSurfaceProxy::Copy(GrRecordingContext* context, GrSurfaceProxy* src,
                                            GrMipMapped mipMapped, SkBackingFit fit,
                                            SkBudgeted budgeted) {
-    SkASSERT(LazyState::kFully != src->lazyInstantiationState());
+    SkASSERT(!src->isFullyLazy());
     return Copy(context, src, mipMapped, SkIRect::MakeWH(src->width(), src->height()), fit,
                 budgeted);
 }
@@ -412,7 +445,7 @@
 #endif
 
 void GrSurfaceProxyPriv::exactify(bool allocatedCaseOnly) {
-    SkASSERT(GrSurfaceProxy::LazyState::kFully != fProxy->lazyInstantiationState());
+    SkASSERT(!fProxy->isFullyLazy());
     if (this->isExact()) {
         return;
     }
@@ -451,7 +484,7 @@
 }
 
 bool GrSurfaceProxyPriv::doLazyInstantiation(GrResourceProvider* resourceProvider) {
-    SkASSERT(GrSurfaceProxy::LazyState::kNot != fProxy->lazyInstantiationState());
+    SkASSERT(fProxy->isLazy());
 
     sk_sp<GrSurface> surface;
     if (fProxy->asTextureProxy() && fProxy->asTextureProxy()->getUniqueKey().isValid()) {
@@ -461,13 +494,12 @@
     }
 
     bool syncKey = true;
+    bool releaseCallback = false;
     if (!surface) {
         auto result = fProxy->fLazyInstantiateCallback(resourceProvider);
         surface = std::move(result.fSurface);
         syncKey = result.fKeyMode == GrSurfaceProxy::LazyInstantiationKeyMode::kSynced;
-    }
-    if (GrSurfaceProxy::LazyInstantiationType::kSingleUse == fProxy->fLazyInstantiationType) {
-        fProxy->fLazyInstantiateCallback = nullptr;
+        releaseCallback = surface && result.fReleaseCallback;
     }
     if (!surface) {
         fProxy->fWidth = 0;
@@ -487,9 +519,8 @@
     SkASSERT(fProxy->fWidth <= surface->width());
     SkASSERT(fProxy->fHeight <= surface->height());
 
-    int minStencilSampleCount = (fProxy->asRenderTargetProxy())
-            ? fProxy->asRenderTargetProxy()->numSamples()
-            : 0;
+    auto rt = fProxy->asRenderTargetProxy();
+    int minStencilSampleCount = rt ? rt->numSamples() : 0;
 
     if (!GrSurfaceProxyPriv::AttachStencilIfNeeded(
             resourceProvider, surface.get(), minStencilSampleCount)) {
@@ -515,6 +546,10 @@
     }
 
     this->assign(std::move(surface));
+    if (releaseCallback) {
+        fProxy->fLazyInstantiateCallback = nullptr;
+    }
+
     return true;
 }
 
diff --git a/src/gpu/GrSurfaceProxy.h b/src/gpu/GrSurfaceProxy.h
index e4bbe52..ca9236f 100644
--- a/src/gpu/GrSurfaceProxy.h
+++ b/src/gpu/GrSurfaceProxy.h
@@ -62,59 +62,61 @@
         kSynced
     };
 
-    struct LazyInstantiationResult {
-        LazyInstantiationResult() = default;
-        LazyInstantiationResult(const LazyInstantiationResult&) = default;
-        LazyInstantiationResult(LazyInstantiationResult&& that) = default;
-        LazyInstantiationResult(sk_sp<GrSurface> surf,
-                                LazyInstantiationKeyMode mode = LazyInstantiationKeyMode::kSynced)
-                : fSurface(std::move(surf)), fKeyMode(mode) {}
-        LazyInstantiationResult(sk_sp<GrTexture> tex)
-                : LazyInstantiationResult(sk_sp<GrSurface>(std::move(tex))) {}
+    struct LazyCallbackResult {
+        LazyCallbackResult() = default;
+        LazyCallbackResult(const LazyCallbackResult&) = default;
+        LazyCallbackResult(LazyCallbackResult&& that) = default;
+        LazyCallbackResult(sk_sp<GrSurface> surf,
+                           bool releaseCallback = true,
+                           LazyInstantiationKeyMode mode = LazyInstantiationKeyMode::kSynced)
+                : fSurface(std::move(surf)), fKeyMode(mode), fReleaseCallback(releaseCallback) {}
+        LazyCallbackResult(sk_sp<GrTexture> tex)
+                : LazyCallbackResult(sk_sp<GrSurface>(std::move(tex))) {}
 
-        LazyInstantiationResult& operator=(const LazyInstantiationResult&) = default;
-        LazyInstantiationResult& operator=(LazyInstantiationResult&&) = default;
+        LazyCallbackResult& operator=(const LazyCallbackResult&) = default;
+        LazyCallbackResult& operator=(LazyCallbackResult&&) = default;
 
         sk_sp<GrSurface> fSurface;
         LazyInstantiationKeyMode fKeyMode = LazyInstantiationKeyMode::kSynced;
+        /**
+         * Should the callback be disposed of after it has returned or preserved until the proxy
+         * is freed. Only honored if fSurface is not-null. If it is null the callback is preserved.
+         */
+        bool fReleaseCallback = true;
     };
 
-    using LazyInstantiateCallback = std::function<LazyInstantiationResult(GrResourceProvider*)>;
+    using LazyInstantiateCallback = std::function<LazyCallbackResult(GrResourceProvider*)>;
 
-    enum class LazyInstantiationType {
-        kSingleUse,      // Instantiation callback is allowed to be called only once.
-        kMultipleUse,    // Instantiation callback can be called multiple times.
-        kDeinstantiate,  // Instantiation callback can be called multiple times,
-                         // but we will deinstantiate the proxy after every flush.
+    enum class UseAllocator {
+        /**
+         * This proxy will be instantiated outside the allocator (e.g. for proxies that are
+         * instantiated in on-flush callbacks).
+         */
+        kNo = false,
+        /**
+         * GrResourceAllocator should instantiate this proxy.
+         */
+        kYes = true,
     };
 
-    enum class LazyState {
-        kNot,       // The proxy is instantiated or does not have a lazy callback
-        kPartially, // The proxy has a lazy callback but knows basic information about itself.
-        kFully,     // The proxy has a lazy callback and also doesn't know its width, height, etc.
-    };
+    bool isLazy() const { return !this->isInstantiated() && SkToBool(fLazyInstantiateCallback); }
 
-    LazyState lazyInstantiationState() const {
-        if (this->isInstantiated() || !SkToBool(fLazyInstantiateCallback)) {
-            return LazyState::kNot;
-        } else {
-            if (fWidth <= 0) {
-                SkASSERT(fHeight <= 0);
-                return LazyState::kFully;
-            } else {
-                SkASSERT(fHeight > 0);
-                return LazyState::kPartially;
-            }
-        }
+    bool isFullyLazy() const {
+        bool result = fHeight <= 0;
+        SkASSERT(result == fWidth <= 0);
+        SkASSERT(!result || this->isLazy());
+        return result;
     }
 
     GrPixelConfig config() const { return fConfig; }
+
     int width() const {
-        SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+        SkASSERT(!this->isFullyLazy());
         return fWidth;
     }
+
     int height() const {
-        SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+        SkASSERT(!this->isFullyLazy());
         return fHeight;
     }
 
@@ -126,14 +128,14 @@
      * Helper that gets the width and height of the surface as a bounding rectangle.
      */
     SkRect getBoundsRect() const {
-        SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+        SkASSERT(!this->isFullyLazy());
         return SkRect::MakeIWH(this->width(), this->height());
     }
     /**
      * Helper that gets the worst case width and height of the surface as a bounding rectangle.
      */
     SkRect getWorstCaseBoundsRect() const {
-        SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+        SkASSERT(!this->isFullyLazy());
         return SkRect::MakeIWH(this->worstCaseWidth(), this->worstCaseHeight());
     }
 
@@ -272,7 +274,7 @@
      * @return the amount of GPU memory used in bytes
      */
     size_t gpuMemorySize() const {
-        SkASSERT(LazyState::kFully != this->lazyInstantiationState());
+        SkASSERT(!this->isFullyLazy());
         if (fTarget) {
             return fTarget->gpuMemorySize();
         }
@@ -313,25 +315,39 @@
     bool isProtected() const { return fIsProtected == GrProtected::kYes; }
 
 protected:
-    // Deferred version
-    GrSurfaceProxy(const GrBackendFormat& format, const GrSurfaceDesc& desc,
-                   GrRenderable renderable, GrSurfaceOrigin origin, const GrSwizzle& textureSwizzle,
-                   SkBackingFit fit, SkBudgeted budgeted, GrProtected isProtected,
-                   GrInternalSurfaceFlags surfaceFlags)
-            : GrSurfaceProxy(nullptr, LazyInstantiationType::kSingleUse, format, desc, renderable,
-                             origin, textureSwizzle, fit, budgeted, isProtected, surfaceFlags) {
-        // Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources
-    }
+    // Deferred version - takes a new UniqueID from the shared resource/proxy pool.
+    GrSurfaceProxy(const GrBackendFormat&,
+                   const GrSurfaceDesc&,
+                   GrRenderable,
+                   GrSurfaceOrigin,
+                   const GrSwizzle& textureSwizzle,
+                   SkBackingFit,
+                   SkBudgeted,
+                   GrProtected,
+                   GrInternalSurfaceFlags,
+                   UseAllocator);
+    // Lazy-callback version - takes a new UniqueID from the shared resource/proxy pool.
+    GrSurfaceProxy(LazyInstantiateCallback&&,
+                   const GrBackendFormat&,
+                   const GrSurfaceDesc&,
+                   GrRenderable,
+                   GrSurfaceOrigin,
+                   const GrSwizzle& textureSwizzle,
+                   SkBackingFit,
+                   SkBudgeted,
+                   GrProtected,
+                   GrInternalSurfaceFlags,
+                   UseAllocator);
 
-    // Lazy-callback version
-    GrSurfaceProxy(LazyInstantiateCallback&&, LazyInstantiationType, const GrBackendFormat& format,
-                   const GrSurfaceDesc&, GrRenderable, GrSurfaceOrigin,
-                   const GrSwizzle& textureSwizzle, SkBackingFit, SkBudgeted, GrProtected,
-                   GrInternalSurfaceFlags);
-
-    // Wrapped version.
-    GrSurfaceProxy(sk_sp<GrSurface>, GrSurfaceOrigin, const GrSwizzle& textureSwizzle,
-                   SkBackingFit);
+    // Wrapped version - shares the UniqueID of the passed surface.
+    // Takes UseAllocator because even though this is already instantiated it still can participate
+    // in allocation by having its backing resource recycled to other uninstantiated proxies or
+    // not depending on UseAllocator.
+    GrSurfaceProxy(sk_sp<GrSurface>,
+                   GrSurfaceOrigin,
+                   const GrSwizzle& textureSwizzle,
+                   SkBackingFit,
+                   UseAllocator);
 
     friend class GrSurfaceProxyPriv;
 
@@ -352,7 +368,7 @@
     // the GPU surface that backs it. e.g., SkBackingFit::kApprox.) Otherwise, the proxy's size will
     // be set to match the underlying GPU surface upon instantiation.
     void setLazySize(int width, int height) {
-        SkASSERT(GrSurfaceProxy::LazyState::kFully == this->lazyInstantiationState());
+        SkASSERT(this->isFullyLazy());
         SkASSERT(width > 0 && height > 0);
         fWidth = width;
         fHeight = height;
@@ -388,16 +404,12 @@
     mutable SkBudgeted     fBudgeted; // always kYes for lazy-callback resources
                                       // set from the backing resource for wrapped resources
                                       // mutable bc of SkSurface/SkImage wishy-washiness
+                                      // Only meaningful if fLazyInstantiateCallback is non-null.
+    UseAllocator           fUseAllocator;
 
     const UniqueID         fUniqueID; // set from the backing resource for wrapped resources
 
     LazyInstantiateCallback fLazyInstantiateCallback;
-    // If this is set to kSingleuse, then after one call to fLazyInstantiateCallback we will cleanup
-    // the lazy callback and then delete it. This will allow for any refs and resources being held
-    // by the standard function to be released. This is specifically useful in non-dll cases where
-    // we make lazy proxies and instantiate them immediately.
-    // Note: This is ignored if fLazyInstantiateCallback is null.
-    LazyInstantiationType  fLazyInstantiationType;
 
     SkDEBUGCODE(void validateSurface(const GrSurface*);)
     SkDEBUGCODE(virtual void onValidateSurface(const GrSurface*) = 0;)
@@ -423,7 +435,7 @@
     // the GrRenderTask used to create the current contents of this surface
     // and the GrRenderTask of a destination surface to which this one is being drawn or copied.
     // This pointer is unreffed. GrRenderTasks own a ref on their surface proxies.
-    GrRenderTask*          fLastRenderTask;
+    GrRenderTask*          fLastRenderTask = nullptr;
 };
 
 GR_MAKE_BITFIELD_CLASS_OPS(GrSurfaceProxy::ResolveFlags)
diff --git a/src/gpu/GrSurfaceProxyPriv.h b/src/gpu/GrSurfaceProxyPriv.h
index 2c65e83..60704ac 100644
--- a/src/gpu/GrSurfaceProxyPriv.h
+++ b/src/gpu/GrSurfaceProxyPriv.h
@@ -38,21 +38,10 @@
 
     bool doLazyInstantiation(GrResourceProvider*);
 
-    GrSurfaceProxy::LazyInstantiationType lazyInstantiationType() const {
-        return fProxy->fLazyInstantiationType;
-    }
-
-    bool isSafeToDeinstantiate() const {
-        return SkToBool(fProxy->fTarget) && SkToBool(fProxy->fLazyInstantiateCallback) &&
-               GrSurfaceProxy::LazyInstantiationType::kDeinstantiate == lazyInstantiationType();
-    }
 
     static bool SK_WARN_UNUSED_RESULT AttachStencilIfNeeded(GrResourceProvider*, GrSurface*,
                                                             int minStencilSampleCount);
 
-    bool ignoredByResourceAllocator() const { return fProxy->ignoredByResourceAllocator(); }
-    void setIgnoredByResourceAllocator() { fProxy->setIgnoredByResourceAllocator(); }
-
 private:
     explicit GrSurfaceProxyPriv(GrSurfaceProxy* proxy) : fProxy(proxy) {}
     GrSurfaceProxyPriv(const GrSurfaceProxyPriv&) {} // unimpl
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 85c6f58..62a9e6e 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -16,41 +16,53 @@
 #include "src/gpu/GrTexturePriv.h"
 
 // Deferred version - no data
-GrTextureProxy::GrTextureProxy(const GrBackendFormat& format, const GrSurfaceDesc& srcDesc,
-                               GrSurfaceOrigin origin, GrMipMapped mipMapped,
-                               GrMipMapsStatus mipMapsStatus, const GrSwizzle& textureSwizzle,
-                               SkBackingFit fit, SkBudgeted budgeted, GrProtected isProtected,
-                               GrInternalSurfaceFlags surfaceFlags)
+GrTextureProxy::GrTextureProxy(const GrBackendFormat& format,
+                               const GrSurfaceDesc& srcDesc,
+                               GrSurfaceOrigin origin,
+                               GrMipMapped mipMapped,
+                               GrMipMapsStatus mipMapsStatus,
+                               const GrSwizzle& textureSwizzle,
+                               SkBackingFit fit,
+                               SkBudgeted budgeted,
+                               GrProtected isProtected,
+                               GrInternalSurfaceFlags surfaceFlags,
+                               UseAllocator useAllocator)
         : INHERITED(format, srcDesc, GrRenderable::kNo, origin, textureSwizzle, fit, budgeted,
-                    isProtected, surfaceFlags)
+                    isProtected, surfaceFlags, useAllocator)
         , fMipMapped(mipMapped)
-        , fMipMapsStatus(mipMapsStatus)
-          SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
+        , fMipMapsStatus(mipMapsStatus) SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
         , fProxyProvider(nullptr)
         , fDeferredUploader(nullptr) {}
 
 // Lazy-callback version
-GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback, LazyInstantiationType lazyType,
-                               const GrBackendFormat& format, const GrSurfaceDesc& desc,
-                               GrSurfaceOrigin origin, GrMipMapped mipMapped,
-                               GrMipMapsStatus mipMapsStatus, const GrSwizzle& texSwizzle,
-                               SkBackingFit fit, SkBudgeted budgeted, GrProtected isProtected,
-                               GrInternalSurfaceFlags surfaceFlags)
-        : INHERITED(std::move(callback), lazyType, format, desc, GrRenderable::kNo, origin,
-                    texSwizzle, fit, budgeted, isProtected, surfaceFlags)
+GrTextureProxy::GrTextureProxy(LazyInstantiateCallback&& callback,
+                               const GrBackendFormat& format,
+                               const GrSurfaceDesc& desc,
+                               GrSurfaceOrigin origin,
+                               GrMipMapped mipMapped,
+                               GrMipMapsStatus mipMapsStatus,
+                               const GrSwizzle& texSwizzle,
+                               SkBackingFit fit,
+                               SkBudgeted budgeted,
+                               GrProtected isProtected,
+                               GrInternalSurfaceFlags surfaceFlags,
+                               UseAllocator useAllocator)
+        : INHERITED(std::move(callback), format, desc, GrRenderable::kNo, origin, texSwizzle, fit,
+                    budgeted, isProtected, surfaceFlags, useAllocator)
         , fMipMapped(mipMapped)
-        , fMipMapsStatus(mipMapsStatus)
-          SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
+        , fMipMapsStatus(mipMapsStatus) SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
         , fProxyProvider(nullptr)
         , fDeferredUploader(nullptr) {}
 
 // Wrapped version
-GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf, GrSurfaceOrigin origin,
-                               const GrSwizzle& textureSwizzle)
-        : INHERITED(std::move(surf), origin, textureSwizzle, SkBackingFit::kExact)
+GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf,
+                               GrSurfaceOrigin origin,
+                               const GrSwizzle& textureSwizzle,
+                               UseAllocator useAllocator)
+        : INHERITED(std::move(surf), origin, textureSwizzle, SkBackingFit::kExact, useAllocator)
         , fMipMapped(fTarget->asTexture()->texturePriv().mipMapped())
         , fMipMapsStatus(fTarget->asTexture()->texturePriv().mipMapsStatus())
-          SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
+                  SkDEBUGCODE(, fInitialMipMapsStatus(fMipMapsStatus))
         , fProxyProvider(nullptr)
         , fDeferredUploader(nullptr) {
     if (fTarget->getUniqueKey().isValid()) {
@@ -76,7 +88,7 @@
 }
 
 bool GrTextureProxy::instantiate(GrResourceProvider* resourceProvider) {
-    if (LazyState::kNot != this->lazyInstantiationState()) {
+    if (this->isLazy()) {
         return false;
     }
     if (!this->instantiateImpl(resourceProvider, 1, /* needsStencil = */ false, GrRenderable::kNo,
diff --git a/src/gpu/GrTextureProxy.h b/src/gpu/GrTextureProxy.h
index 42e5af0..f756c07 100644
--- a/src/gpu/GrTextureProxy.h
+++ b/src/gpu/GrTextureProxy.h
@@ -105,9 +105,17 @@
     friend class GrSurfaceProxyPriv;  // ability to change key sync state after lazy instantiation.
 
     // Deferred version - no data.
-    GrTextureProxy(const GrBackendFormat&, const GrSurfaceDesc& srcDesc, GrSurfaceOrigin,
-                   GrMipMapped, GrMipMapsStatus, const GrSwizzle& textureSwizzle, SkBackingFit,
-                   SkBudgeted, GrProtected, GrInternalSurfaceFlags);
+    GrTextureProxy(const GrBackendFormat&,
+                   const GrSurfaceDesc&,
+                   GrSurfaceOrigin,
+                   GrMipMapped,
+                   GrMipMapsStatus,
+                   const GrSwizzle& textureSwizzle,
+                   SkBackingFit,
+                   SkBudgeted,
+                   GrProtected,
+                   GrInternalSurfaceFlags,
+                   UseAllocator);
 
     // Lazy-callback version
     // There are two main use cases for lazily-instantiated proxies:
@@ -119,12 +127,21 @@
     //
     // The minimal knowledge version is used for CCPR where we are generating an atlas but we do not
     // know the final size until flush time.
-    GrTextureProxy(LazyInstantiateCallback&&, LazyInstantiationType, const GrBackendFormat&,
-                   const GrSurfaceDesc& desc, GrSurfaceOrigin, GrMipMapped, GrMipMapsStatus,
-                   const GrSwizzle&, SkBackingFit, SkBudgeted, GrProtected, GrInternalSurfaceFlags);
+    GrTextureProxy(LazyInstantiateCallback&&,
+                   const GrBackendFormat&,
+                   const GrSurfaceDesc& desc,
+                   GrSurfaceOrigin,
+                   GrMipMapped,
+                   GrMipMapsStatus,
+                   const GrSwizzle& textureSwizzle,
+                   SkBackingFit,
+                   SkBudgeted,
+                   GrProtected,
+                   GrInternalSurfaceFlags,
+                   UseAllocator);
 
     // Wrapped version
-    GrTextureProxy(sk_sp<GrSurface>, GrSurfaceOrigin, const GrSwizzle&);
+    GrTextureProxy(sk_sp<GrSurface>, GrSurfaceOrigin, const GrSwizzle&, UseAllocator);
 
     ~GrTextureProxy() override;
 
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index fb54227..bada555 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -32,21 +32,21 @@
                                                        SkBackingFit fit,
                                                        SkBudgeted budgeted,
                                                        GrProtected isProtected,
-                                                       GrInternalSurfaceFlags surfaceFlags)
+                                                       GrInternalSurfaceFlags surfaceFlags,
+                                                       UseAllocator useAllocator)
         : GrSurfaceProxy(format, desc, GrRenderable::kYes, origin, texSwizzle, fit, budgeted,
-                         isProtected, surfaceFlags)
+                         isProtected, surfaceFlags, useAllocator)
         // for now textures w/ data are always wrapped
         , GrRenderTargetProxy(caps, format, desc, sampleCnt, origin, texSwizzle, outSwizzle, fit,
-                              budgeted, isProtected, surfaceFlags)
+                              budgeted, isProtected, surfaceFlags, useAllocator)
         , GrTextureProxy(format, desc, origin, mipMapped, mipMapsStatus, texSwizzle, fit, budgeted,
-                         isProtected, surfaceFlags) {
+                         isProtected, surfaceFlags, useAllocator) {
     this->initSurfaceFlags(caps);
 }
 
 // Lazy-callback version
 GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps,
                                                        LazyInstantiateCallback&& callback,
-                                                       LazyInstantiationType lazyType,
                                                        const GrBackendFormat& format,
                                                        const GrSurfaceDesc& desc,
                                                        int sampleCnt,
@@ -58,16 +58,17 @@
                                                        SkBackingFit fit,
                                                        SkBudgeted budgeted,
                                                        GrProtected isProtected,
-                                                       GrInternalSurfaceFlags surfaceFlags)
-        : GrSurfaceProxy(std::move(callback), lazyType, format, desc, GrRenderable::kYes, origin,
-                         texSwizzle, fit, budgeted, isProtected, surfaceFlags)
+                                                       GrInternalSurfaceFlags surfaceFlags,
+                                                       UseAllocator useAllocator)
+        : GrSurfaceProxy(std::move(callback), format, desc, GrRenderable::kYes, origin, texSwizzle,
+                         fit, budgeted, isProtected, surfaceFlags, useAllocator)
         // Since we have virtual inheritance, we initialize GrSurfaceProxy directly. Send null
         // callbacks to the texture and RT proxies simply to route to the appropriate constructors.
-        , GrRenderTargetProxy(LazyInstantiateCallback(), lazyType, format, desc, sampleCnt, origin,
+        , GrRenderTargetProxy(LazyInstantiateCallback(), format, desc, sampleCnt, origin,
                               texSwizzle, outSwizzle, fit, budgeted, isProtected, surfaceFlags,
-                              WrapsVkSecondaryCB::kNo)
-        , GrTextureProxy(LazyInstantiateCallback(), lazyType, format, desc, origin, mipMapped,
-                         mipMapsStatus, texSwizzle, fit, budgeted, isProtected, surfaceFlags) {
+                              useAllocator, WrapsVkSecondaryCB::kNo)
+        , GrTextureProxy(LazyInstantiateCallback(), format, desc, origin, mipMapped, mipMapsStatus,
+                         texSwizzle, fit, budgeted, isProtected, surfaceFlags, useAllocator) {
     this->initSurfaceFlags(caps);
 }
 
@@ -77,10 +78,11 @@
 GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(sk_sp<GrSurface> surf,
                                                        GrSurfaceOrigin origin,
                                                        const GrSwizzle& texSwizzle,
-                                                       const GrSwizzle& outSwizzle)
-        : GrSurfaceProxy(surf, origin, texSwizzle, SkBackingFit::kExact)
-        , GrRenderTargetProxy(surf, origin, texSwizzle, outSwizzle)
-        , GrTextureProxy(surf, origin, texSwizzle) {
+                                                       const GrSwizzle& outSwizzle,
+                                                       UseAllocator useAllocator)
+        : GrSurfaceProxy(surf, origin, texSwizzle, SkBackingFit::kExact, useAllocator)
+        , GrRenderTargetProxy(surf, origin, texSwizzle, outSwizzle, useAllocator)
+        , GrTextureProxy(surf, origin, texSwizzle, useAllocator) {
     SkASSERT(surf->asTexture());
     SkASSERT(surf->asRenderTarget());
     SkASSERT(fSurfaceFlags == fTarget->surfacePriv().flags());
@@ -118,7 +120,7 @@
 }
 
 bool GrTextureRenderTargetProxy::instantiate(GrResourceProvider* resourceProvider) {
-    if (LazyState::kNot != this->lazyInstantiationState()) {
+    if (this->isLazy()) {
         return false;
     }
 
diff --git a/src/gpu/GrTextureRenderTargetProxy.h b/src/gpu/GrTextureRenderTargetProxy.h
index a31e520..be86d35 100644
--- a/src/gpu/GrTextureRenderTargetProxy.h
+++ b/src/gpu/GrTextureRenderTargetProxy.h
@@ -28,21 +28,44 @@
     friend class GrProxyProvider; // for ctors
 
     // Deferred version
-    GrTextureRenderTargetProxy(const GrCaps&, const GrBackendFormat&, const GrSurfaceDesc&,
-                               int sampleCnt, GrSurfaceOrigin, GrMipMapped, GrMipMapsStatus,
-                               const GrSwizzle& textureSwizzle, const GrSwizzle& outputSwizzle,
-                               SkBackingFit, SkBudgeted, GrProtected, GrInternalSurfaceFlags);
+    GrTextureRenderTargetProxy(const GrCaps&,
+                               const GrBackendFormat&,
+                               const GrSurfaceDesc&,
+                               int sampleCnt,
+                               GrSurfaceOrigin,
+                               GrMipMapped,
+                               GrMipMapsStatus,
+                               const GrSwizzle& textureSwizzle,
+                               const GrSwizzle& outputSwizzle,
+                               SkBackingFit,
+                               SkBudgeted,
+                               GrProtected,
+                               GrInternalSurfaceFlags,
+                               UseAllocator);
 
     // Lazy-callback version
-    GrTextureRenderTargetProxy(const GrCaps&, LazyInstantiateCallback&&, LazyInstantiationType,
-                               const GrBackendFormat&, const GrSurfaceDesc& desc, int sampleCnt,
-                               GrSurfaceOrigin, GrMipMapped, GrMipMapsStatus,
-                               const GrSwizzle& textureSwizzle, const GrSwizzle& outputSwizzle,
-                               SkBackingFit, SkBudgeted, GrProtected, GrInternalSurfaceFlags);
+    GrTextureRenderTargetProxy(const GrCaps&,
+                               LazyInstantiateCallback&&,
+                               const GrBackendFormat&,
+                               const GrSurfaceDesc& desc,
+                               int sampleCnt,
+                               GrSurfaceOrigin,
+                               GrMipMapped,
+                               GrMipMapsStatus,
+                               const GrSwizzle& textureSwizzle,
+                               const GrSwizzle& outputSwizzle,
+                               SkBackingFit,
+                               SkBudgeted,
+                               GrProtected,
+                               GrInternalSurfaceFlags,
+                               UseAllocator);
 
     // Wrapped version
-    GrTextureRenderTargetProxy(sk_sp<GrSurface>, GrSurfaceOrigin, const GrSwizzle& textureSwizzle,
-                               const GrSwizzle& outputSwizzle);
+    GrTextureRenderTargetProxy(sk_sp<GrSurface>,
+                               GrSurfaceOrigin,
+                               const GrSwizzle& textureSwizzle,
+                               const GrSwizzle& outputSwizzle,
+                               UseAllocator);
 
     void initSurfaceFlags(const GrCaps&);
 
diff --git a/src/gpu/ccpr/GrCCAtlas.cpp b/src/gpu/ccpr/GrCCAtlas.cpp
index a454899..5db2f2f 100644
--- a/src/gpu/ccpr/GrCCAtlas.cpp
+++ b/src/gpu/ccpr/GrCCAtlas.cpp
@@ -50,8 +50,10 @@
     GrRectanizerSkyline fRectanizer;
 };
 
-sk_sp<GrTextureProxy> GrCCAtlas::MakeLazyAtlasProxy(
-        const LazyInstantiateAtlasCallback& callback, CoverageType coverageType, const GrCaps& caps) {
+sk_sp<GrTextureProxy> GrCCAtlas::MakeLazyAtlasProxy(const LazyInstantiateAtlasCallback& callback,
+                                                    CoverageType coverageType,
+                                                    const GrCaps& caps,
+                                                    GrSurfaceProxy::UseAllocator useAllocator) {
     GrPixelConfig pixelConfig;
     int sampleCount;
 
@@ -79,7 +81,7 @@
     };
     sk_sp<GrTextureProxy> proxy = GrProxyProvider::MakeFullyLazyProxy(
             std::move(instantiate), format, GrRenderable::kYes, sampleCount, GrProtected::kNo,
-            kTextureOrigin, pixelConfig, caps);
+            kTextureOrigin, pixelConfig, caps, useAllocator);
 
     return proxy;
 }
@@ -125,9 +127,7 @@
                 }
                 return fBackingTexture;
             },
-            fCoverageType, caps);
-
-    fTextureProxy->priv().setIgnoredByResourceAllocator();
+            fCoverageType, caps, GrSurfaceProxy::UseAllocator::kNo);
 }
 
 GrCCAtlas::~GrCCAtlas() {
diff --git a/src/gpu/ccpr/GrCCAtlas.h b/src/gpu/ccpr/GrCCAtlas.h
index 283338c..ac7faaa 100644
--- a/src/gpu/ccpr/GrCCAtlas.h
+++ b/src/gpu/ccpr/GrCCAtlas.h
@@ -14,6 +14,7 @@
 #include "include/private/GrResourceKey.h"
 #include "src/gpu/GrAllocator.h"
 #include "src/gpu/GrNonAtomicRef.h"
+#include "src/gpu/GrSurfaceProxy.h"
 
 class GrCCCachedAtlas;
 class GrOnFlushResourceProvider;
@@ -67,8 +68,10 @@
     using LazyInstantiateAtlasCallback = std::function<sk_sp<GrTexture>(
             GrResourceProvider*, GrPixelConfig, const GrBackendFormat&, int sampleCount)>;
 
-    static sk_sp<GrTextureProxy> MakeLazyAtlasProxy(
-            const LazyInstantiateAtlasCallback&, CoverageType, const GrCaps&);
+    static sk_sp<GrTextureProxy> MakeLazyAtlasProxy(const LazyInstantiateAtlasCallback&,
+                                                    CoverageType,
+                                                    const GrCaps&,
+                                                    GrSurfaceProxy::UseAllocator);
 
     GrCCAtlas(CoverageType, const Specs&, const GrCaps&);
     ~GrCCAtlas();
diff --git a/src/gpu/ccpr/GrCCClipPath.cpp b/src/gpu/ccpr/GrCCClipPath.cpp
index 4cfd981..9e86d2e 100644
--- a/src/gpu/ccpr/GrCCClipPath.cpp
+++ b/src/gpu/ccpr/GrCCClipPath.cpp
@@ -45,7 +45,7 @@
 
                 return texture;
             },
-            atlasCoverageType, caps);
+            atlasCoverageType, caps, GrSurfaceProxy::UseAllocator::kYes);
 
     fDeviceSpacePath = deviceSpacePath;
     fDeviceSpacePath.getBounds().roundOut(&fPathDevIBounds);
diff --git a/src/gpu/ccpr/GrCCPathCache.cpp b/src/gpu/ccpr/GrCCPathCache.cpp
index 3fcc9aa..667786a 100644
--- a/src/gpu/ccpr/GrCCPathCache.cpp
+++ b/src/gpu/ccpr/GrCCPathCache.cpp
@@ -233,8 +233,8 @@
             if (!entry->fCachedAtlas->getOnFlushProxy()) {
                 auto ct = GrCCAtlas::CoverageTypeToColorType(entry->fCachedAtlas->coverageType());
                 if (sk_sp<GrTextureProxy> onFlushProxy = onFlushRP->findOrCreateProxyByUniqueKey(
-                            entry->fCachedAtlas->textureKey(), ct, GrCCAtlas::kTextureOrigin)) {
-                    onFlushProxy->priv().setIgnoredByResourceAllocator();
+                            entry->fCachedAtlas->textureKey(), ct, GrCCAtlas::kTextureOrigin,
+                            GrSurfaceProxy::UseAllocator::kNo)) {
                     entry->fCachedAtlas->setOnFlushProxy(std::move(onFlushProxy));
                 }
             }
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index b3af37a..6709f63 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -409,9 +409,15 @@
     const GrBackendFormat format =
             context->priv().caps()->getDefaultBackendFormat(GrColorType::kRGBA_8888,
                                                             GrRenderable::kNo);
-    auto proxy = context->priv().proxyProvider()->createProxy(format, desc, GrRenderable::kNo, 1,
-                                                              origin, SkBackingFit::kExact,
-                                                              SkBudgeted::kYes, GrProtected::kNo);
+    auto proxy = context->priv().proxyProvider()->createProxy(format,
+                                                              desc,
+                                                              GrRenderable::kNo,
+                                                              1,
+                                                              origin,
+                                                              GrMipMapped::kNo,
+                                                              SkBackingFit::kExact,
+                                                              SkBudgeted::kYes,
+                                                              GrProtected::kNo);
 
     do {
         if (random->nextBool()) {
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index a47d3d2..4c3761a 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -398,16 +398,21 @@
             }
         }
 
-        GrSurfaceProxy::LazyInstantiationResult operator()(GrResourceProvider* resourceProvider) {
+        GrSurfaceProxy::LazyCallbackResult operator()(GrResourceProvider* resourceProvider) {
             // We use the unique key in a way that is unrelated to the SkImage-based key that the
             // proxy may receive, hence kUnsynced.
             static constexpr auto kKeySyncMode =
                     GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced;
 
+            // In order to make the SkImage "thread safe" we rely on holding an extra ref to the
+            // texture in the callback and signalling the unref via a message to the resource cache.
+            // We need to extend the callback's lifetime to that of the proxy.
+            static constexpr auto kReleaseCallbackOnInstantiation = false;
+
             // Our proxy is getting instantiated for the second+ time. We are only allowed to call
             // Fulfill once. So return our cached result.
             if (fTexture) {
-                return {sk_ref_sp(fTexture), kKeySyncMode};
+                return {sk_ref_sp(fTexture), kReleaseCallbackOnInstantiation, kKeySyncMode};
             } else if (fColorType == GrColorType::kUnknown) {
                 // We've already called fulfill and it failed. Our contract says that we should only
                 // call each callback once.
@@ -466,7 +471,7 @@
             GrContext* context = fTexture->getContext();
             context->priv().getResourceCache()->insertDelayedResourceUnref(fTexture);
             fTextureContextID = context->priv().contextID();
-            return {std::move(tex), kKeySyncMode};
+            return {std::move(tex), kReleaseCallbackOnInstantiation, kKeySyncMode};
         }
 
     private:
@@ -500,5 +505,5 @@
     return proxyProvider->createLazyProxy(
             std::move(callback), backendFormat, desc, GrRenderable::kNo, 1, origin, mipMapped,
             mipMapsStatus, GrInternalSurfaceFlags::kReadOnly, SkBackingFit::kExact, SkBudgeted::kNo,
-            GrProtected::kNo, GrSurfaceProxy::LazyInstantiationType::kDeinstantiate);
+            GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
 }
diff --git a/tests/DetermineDomainModeTest.cpp b/tests/DetermineDomainModeTest.cpp
index 8460dd7..16eaa28 100644
--- a/tests/DetermineDomainModeTest.cpp
+++ b/tests/DetermineDomainModeTest.cpp
@@ -149,7 +149,7 @@
               name);
 
     return proxyProvider->createProxy(format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin,
-                                      fit, SkBudgeted::kYes, GrProtected::kNo);
+                                      GrMipMapped::kNo, fit, SkBudgeted::kYes, GrProtected::kNo);
 }
 
 static RectInfo::EdgeType compute_inset_edgetype(RectInfo::EdgeType previous,
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index 8d616d6..26be426 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -154,7 +154,7 @@
                 return;
             }
 
-            if (GrSurfaceProxy::LazyState::kNot != genProxy->lazyInstantiationState()) {
+            if (genProxy->isLazy()) {
                 genProxy->priv().doLazyInstantiation(context->priv().resourceProvider());
             } else if (!genProxy->isInstantiated()) {
                 genProxy->instantiate(context->priv().resourceProvider());
@@ -347,7 +347,7 @@
     desc.fConfig = mipmapProxy->config();
     sk_sp<GrSurfaceProxy> renderTarget = proxyProvider->createProxy(
             mipmapProxy->backendFormat(), desc, GrRenderable::kYes, 1, kTopLeft_GrSurfaceOrigin,
-            SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
+            GrMipMapped::kNo, SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
     auto rtc = drawingManager->makeRenderTargetContext(
             std::move(renderTarget), colorType, nullptr, nullptr, true);
     rtc->drawTexture(GrNoClip(), mipmapProxy, filter, SkBlendMode::kSrcOver, {1,1,1,1},
@@ -389,9 +389,9 @@
         desc.fWidth = 4;
         desc.fHeight = 4;
         desc.fConfig = config;
-        sk_sp<GrTextureProxy> mipmapProxy = proxyProvider->createMipMapProxy(
-                format, desc, GrRenderable::kYes, 1, kTopLeft_GrSurfaceOrigin, SkBudgeted::kYes,
-                GrProtected::kNo);
+        sk_sp<GrTextureProxy> mipmapProxy = proxyProvider->createProxy(
+                format, desc, GrRenderable::kYes, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kYes,
+                SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo);
 
         // Mark the mipmaps clean to ensure things still work properly when they won't be marked
         // dirty again until GrRenderTask::makeClosed().
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index e87ddc8..4ff7d46 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -170,9 +170,9 @@
                 bool expectedMipMapability = isTexturable && caps->mipMapSupport() &&
                                               !caps->isFormatCompressed(combo.fFormat);
 
-                sk_sp<GrTextureProxy> proxy = proxyProvider->createMipMapProxy(
-                            combo.fFormat, desc, GrRenderable::kNo, 1, origin,
-                            SkBudgeted::kNo, GrProtected::kNo);
+                sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
+                        combo.fFormat, desc, GrRenderable::kNo, 1, origin, GrMipMapped::kYes,
+                        SkBackingFit::kExact, SkBudgeted::kNo, GrProtected::kNo);
                 REPORTER_ASSERT(reporter, SkToBool(proxy.get()) == expectedMipMapability,
                                 "ct:%s format:%s, tex:%d, expectedMipMapability:%d",
                                 GrColorTypeToStr(combo.fColorType),
@@ -577,7 +577,7 @@
                     if (texture->getUniqueKey().isValid()) {
                         mode = GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced;
                     }
-                    return GrSurfaceProxy::LazyInstantiationResult{std::move(texture), mode};
+                    return GrSurfaceProxy::LazyCallbackResult{std::move(texture), true, mode};
                 };
                 GrSurfaceDesc desc;
                 desc.fWidth = w;
@@ -594,7 +594,7 @@
                         GrSurfaceOrigin::kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
                         GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags ::kNone,
                         SkBackingFit::kExact, budgeted, GrProtected::kNo,
-                        GrSurfaceProxy::LazyInstantiationType::kSingleUse);
+                        GrSurfaceProxy::UseAllocator::kYes);
                 rtc->drawTexture(GrNoClip(), proxy, GrSamplerState::Filter::kNearest,
                                  SkBlendMode::kSrcOver, SkPMColor4f(), SkRect::MakeWH(w, h),
                                  SkRect::MakeWH(w, h), GrAA::kNo, GrQuadAAFlags::kNone,
@@ -618,34 +618,6 @@
                 // Now that the draw is fully consumed by the GPU, the texture should be idle.
                 REPORTER_ASSERT(reporter, idleIDs.find(2) != idleIDs.end());
 
-                // Make a proxy that should deinstantiate even if we keep a ref on it.
-                auto deinstantiateLazyCB = [&make, &context](GrResourceProvider* rp) {
-                    auto texture = make(context, 3);
-                    auto mode = GrSurfaceProxy::LazyInstantiationKeyMode::kSynced;
-                    if (texture->getUniqueKey().isValid()) {
-                        mode = GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced;
-                    }
-                    return GrSurfaceProxy::LazyInstantiationResult{std::move(texture), mode};
-                };
-                proxy = context->priv().proxyProvider()->createLazyProxy(
-                        deinstantiateLazyCB, backendFormat, desc, renderable, 1,
-                        GrSurfaceOrigin::kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
-                        GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags ::kNone,
-                        SkBackingFit::kExact, budgeted, GrProtected::kNo,
-                        GrSurfaceProxy::LazyInstantiationType::kDeinstantiate);
-                rtc->drawTexture(GrNoClip(), std::move(proxy), GrSamplerState::Filter::kNearest,
-                                 SkBlendMode::kSrcOver, SkPMColor4f(), SkRect::MakeWH(w, h),
-                                 SkRect::MakeWH(w, h), GrAA::kNo, GrQuadAAFlags::kNone,
-                                 SkCanvas::kFast_SrcRectConstraint, SkMatrix::I(), nullptr);
-                // At this point the proxy shouldn't even be instantiated, there is no texture with
-                // id 3.
-                REPORTER_ASSERT(reporter, idleIDs.find(3) == idleIDs.end());
-                context->flush();
-                context->priv().getGpu()->testingOnly_flushGpuAndSync();
-                // Now that the draw is fully consumed, we should have deinstantiated the proxy and
-                // the texture it made should be idle.
-                REPORTER_ASSERT(reporter, idleIDs.find(3) != idleIDs.end());
-
                 // Make sure we make the call during various shutdown scenarios where the texture
                 // might persist after context is destroyed, abandoned, etc. We test three
                 // variations of each scenario. One where the texture is just created. Another,
@@ -659,7 +631,7 @@
                 if (api == GrBackendApi::kVulkan) {
                     continue;
                 }
-                int id = 4;
+                int id = 3;
                 enum class DrawType {
                     kNoDraw,
                     kDraw,
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index c7e5ffc..106a51a 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -84,8 +84,8 @@
                 ctx->priv().caps()->getDefaultBackendFormat(GrColorType::kBGR_565,
                                                             GrRenderable::kNo);
             fProxy = GrProxyProvider::MakeFullyLazyProxy(
-                    [this, format, nullTexture](
-                            GrResourceProvider* rp) -> GrSurfaceProxy::LazyInstantiationResult {
+                    [this, format,
+                     nullTexture](GrResourceProvider* rp) -> GrSurfaceProxy::LazyCallbackResult {
                         REPORTER_ASSERT(fTest->fReporter, !fTest->fHasOpTexture);
                         fTest->fHasOpTexture = true;
                         if (nullTexture) {
@@ -103,7 +103,8 @@
                         }
                     },
                     format, GrRenderable::kNo, 1, GrProtected::kNo, kTopLeft_GrSurfaceOrigin,
-                    kRGB_565_GrPixelConfig, *proxyProvider->caps());
+                    kRGB_565_GrPixelConfig, *proxyProvider->caps(),
+                    GrSurfaceProxy::UseAllocator::kYes);
 
             this->setBounds(SkRectPriv::MakeLargest(), GrOp::HasAABloat::kNo,
                             GrOp::IsZeroArea::kNo);
@@ -134,14 +135,15 @@
                 ctx->priv().caps()->getDefaultBackendFormat(GrColorType::kAlpha_F16,
                                                             GrRenderable::kYes);
             fLazyProxy = GrProxyProvider::MakeFullyLazyProxy(
-                    [this](GrResourceProvider* rp) -> GrSurfaceProxy::LazyInstantiationResult {
+                    [this](GrResourceProvider* rp) -> GrSurfaceProxy::LazyCallbackResult {
                         REPORTER_ASSERT(fTest->fReporter, !fTest->fHasClipTexture);
                         fTest->fHasClipTexture = true;
                         fAtlas->instantiate(rp);
                         return sk_ref_sp(fAtlas->peekTexture());
                     },
                     format, GrRenderable::kYes, 1, GrProtected::kNo, kBottomLeft_GrSurfaceOrigin,
-                    kAlpha_half_GrPixelConfig, *proxyProvider->caps());
+                    kAlpha_half_GrPixelConfig, *proxyProvider->caps(),
+                    GrSurfaceProxy::UseAllocator::kYes);
             fAccess.reset(fLazyProxy, GrSamplerState::Filter::kNearest,
                           GrSamplerState::WrapMode::kClamp);
             this->setTextureSamplerCnt(1);
@@ -236,19 +238,26 @@
     GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kRGBA_8888,
                                                            GrRenderable::kNo);
 
-    using LazyInstantiationType = GrSurfaceProxy::LazyInstantiationType;
-    using LazyInstantiationResult = GrSurfaceProxy::LazyInstantiationResult;
+    auto tex = ctx->priv().resourceProvider()->createTexture(desc, format, GrRenderable::kNo, 1,
+                                                             SkBudgeted::kNo, GrProtected::kNo);
+    using LazyInstantiationResult = GrSurfaceProxy::LazyCallbackResult;
     for (bool doInstantiate : {true, false}) {
-        for (auto lazyType : {LazyInstantiationType::kSingleUse,
-                              LazyInstantiationType::kMultipleUse,
-                              LazyInstantiationType::kDeinstantiate}) {
+        for (bool releaseCallback : {false, true}) {
             int testCount = 0;
             // Sets an integer to 1 when the callback is called and -1 when it is deleted.
             class TestCallback {
             public:
-                TestCallback(int* value) : fValue(value) {}
+                TestCallback(int* value, bool releaseCallback, sk_sp<GrTexture> tex)
+                        : fValue(value)
+                        , fReleaseCallback(releaseCallback)
+                        , fTexture(std::move(tex)) {}
                 TestCallback(const TestCallback& that) { SkASSERT(0); }
-                TestCallback(TestCallback&& that) : fValue(that.fValue) { that.fValue = nullptr; }
+                TestCallback(TestCallback&& that)
+                        : fValue(that.fValue)
+                        , fReleaseCallback(that.fReleaseCallback)
+                        , fTexture(std::move(that.fTexture)) {
+                    that.fValue = nullptr;
+                }
 
                 ~TestCallback() { fValue ? (void)(*fValue = -1) : void(); }
 
@@ -260,25 +269,27 @@
 
                 LazyInstantiationResult operator()(GrResourceProvider* resourceProvider) const {
                     *fValue = 1;
-                    return {};
+                    return {fTexture, fReleaseCallback};
                 }
 
             private:
                 int* fValue = nullptr;
+                bool fReleaseCallback;
+                sk_sp<GrTexture> fTexture;
             };
             sk_sp<GrTextureProxy> proxy = proxyProvider->createLazyProxy(
-                    TestCallback(&testCount), format, desc, GrRenderable::kNo, 1,
-                    kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated,
+                    TestCallback(&testCount, releaseCallback, tex), format, desc, GrRenderable::kNo,
+                    1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated,
                     GrInternalSurfaceFlags::kNone, SkBackingFit::kExact, SkBudgeted::kNo,
-                    GrProtected::kNo, lazyType);
+                    GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
 
             REPORTER_ASSERT(reporter, proxy.get());
             REPORTER_ASSERT(reporter, 0 == testCount);
 
             if (doInstantiate) {
                 proxy->priv().doLazyInstantiation(ctx->priv().resourceProvider());
-                if (LazyInstantiationType::kSingleUse == proxy->priv().lazyInstantiationType()) {
-                    // In SingleUse we will call the cleanup and delete the callback in the
+                if (releaseCallback) {
+                    // We will call the cleanup and delete the callback in the
                     // doLazyInstantiationCall.
                     REPORTER_ASSERT(reporter, -1 == testCount);
                 } else {
@@ -330,7 +341,7 @@
 
         fLazyProxy = proxyProvider->createLazyProxy(
                 [testExecuteValue, shouldFailInstantiation, desc,
-                 format](GrResourceProvider* rp) -> GrSurfaceProxy::LazyInstantiationResult {
+                 format](GrResourceProvider* rp) -> GrSurfaceProxy::LazyCallbackResult {
                     if (shouldFailInstantiation) {
                         *testExecuteValue = 1;
                         return {};
@@ -338,11 +349,11 @@
                     return {rp->createTexture(desc, format, GrRenderable::kNo, 1, SkBudgeted::kNo,
                                               GrProtected::kNo,
                                               GrResourceProvider::Flags::kNoPendingIO),
-                            GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced};
+                            true, GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced};
                 },
                 format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
-                GrMipMapsStatus::kNotAllocated, SkBackingFit::kExact, SkBudgeted::kNo,
-                GrProtected::kNo);
+                GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags::kNone, SkBackingFit::kExact,
+                SkBudgeted::kNo, GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
 
         SkASSERT(fLazyProxy.get());
 
@@ -393,131 +404,3 @@
         }
     }
 }
-
-class LazyDeinstantiateTestOp : public GrDrawOp {
-public:
-    DEFINE_OP_CLASS_ID
-
-    static std::unique_ptr<GrDrawOp> Make(GrContext* context, sk_sp<GrTextureProxy> proxy) {
-        GrOpMemoryPool* pool = context->priv().opMemoryPool();
-
-        return pool->allocate<LazyDeinstantiateTestOp>(std::move(proxy));
-    }
-
-    void visitProxies(const VisitProxyFunc& func) const override {
-        func(fLazyProxy.get(), GrMipMapped::kNo);
-    }
-
-private:
-    friend class GrOpMemoryPool; // for ctor
-
-    LazyDeinstantiateTestOp(sk_sp<GrTextureProxy> proxy)
-            : INHERITED(ClassID()), fLazyProxy(std::move(proxy)) {
-        this->setBounds(SkRect::MakeIWH(kSize, kSize), HasAABloat::kNo, IsZeroArea::kNo);
-    }
-
-    const char* name() const override { return "LazyDeinstantiateTestOp"; }
-    FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; }
-    GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*,
-                                      bool hasMixedSampledCoverage, GrClampType) override {
-        return GrProcessorSet::EmptySetAnalysis();
-    }
-    void onPrepare(GrOpFlushState*) override {}
-    void onExecute(GrOpFlushState* state, const SkRect& chainBounds) override {}
-
-    sk_sp<GrTextureProxy> fLazyProxy;
-
-    typedef GrDrawOp INHERITED;
-};
-
-static void DeinstantiateReleaseProc(void* releaseValue) { (*static_cast<int*>(releaseValue))++; }
-
-// Test that lazy proxies with the Deinstantiate LazyCallbackType are deinstantiated and released as
-// expected.
-DEF_GPUTEST(LazyProxyDeinstantiateTest, reporter, /* options */) {
-    GrMockOptions mockOptions;
-    sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions());
-    GrProxyProvider* proxyProvider = ctx->priv().proxyProvider();
-
-    GrBackendFormat format =
-        ctx->priv().caps()->getDefaultBackendFormat(GrColorType::kRGBA_8888,
-                                                    GrRenderable::kNo);
-
-    using LazyType = GrSurfaceProxy::LazyInstantiationType;
-    for (auto lazyType : {LazyType::kSingleUse, LazyType::kMultipleUse, LazyType::kDeinstantiate}) {
-        auto rtc = ctx->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100,
-                                                               GrColorType::kRGBA_8888, nullptr);
-        REPORTER_ASSERT(reporter, rtc);
-
-        rtc->clear(nullptr, SkPMColor4f::FromBytes_RGBA(0xbaaaaaad),
-                   GrRenderTargetContext::CanClearFullscreen::kYes);
-
-        int instantiateTestValue = 0;
-        int releaseTestValue = 0;
-        int* instantiatePtr = &instantiateTestValue;
-        int* releasePtr = &releaseTestValue;
-        GrSurfaceDesc desc;
-        desc.fWidth = kSize;
-        desc.fHeight = kSize;
-        desc.fConfig = kRGBA_8888_GrPixelConfig;
-
-        GrBackendTexture backendTex = ctx->createBackendTexture(
-                kSize, kSize, kRGBA_8888_SkColorType, SkColors::kTransparent,
-                GrMipMapped::kNo, GrRenderable::kNo, GrProtected::kNo);
-
-        sk_sp<GrTextureProxy> lazyProxy = proxyProvider->createLazyProxy(
-                [instantiatePtr, releasePtr,
-                 backendTex](GrResourceProvider* rp) -> GrSurfaceProxy::LazyInstantiationResult {
-                    sk_sp<GrTexture> texture =
-                            rp->wrapBackendTexture(backendTex, GrColorType::kRGBA_8888,
-                                                   kBorrow_GrWrapOwnership, GrWrapCacheable::kNo,
-                                                   kRead_GrIOType);
-                    if (!texture) {
-                        return {};
-                    }
-                    (*instantiatePtr)++;
-                    texture->setRelease(DeinstantiateReleaseProc, releasePtr);
-                    return texture;
-                },
-                format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
-                GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags::kReadOnly,
-                SkBackingFit::kExact, SkBudgeted::kNo, GrProtected::kNo, lazyType);
-
-        REPORTER_ASSERT(reporter, lazyProxy.get());
-
-        rtc->priv().testingOnly_addDrawOp(LazyDeinstantiateTestOp::Make(ctx.get(), lazyProxy));
-
-        ctx->flush();
-
-        REPORTER_ASSERT(reporter, 1 == instantiateTestValue);
-        if (LazyType::kDeinstantiate == lazyType) {
-            REPORTER_ASSERT(reporter, 1 == releaseTestValue);
-        } else {
-            REPORTER_ASSERT(reporter, 0 == releaseTestValue);
-        }
-
-        // This should cause the uninstantiate proxies to be instantiated again but have no effect
-        // on the others
-        rtc->priv().testingOnly_addDrawOp(LazyDeinstantiateTestOp::Make(ctx.get(), lazyProxy));
-        // Add a second op to make sure we only instantiate once.
-        rtc->priv().testingOnly_addDrawOp(LazyDeinstantiateTestOp::Make(ctx.get(), lazyProxy));
-        ctx->flush();
-
-        if (LazyType::kDeinstantiate == lazyType) {
-            REPORTER_ASSERT(reporter, 2 == instantiateTestValue);
-            REPORTER_ASSERT(reporter, 2 == releaseTestValue);
-        } else {
-            REPORTER_ASSERT(reporter, 1 == instantiateTestValue);
-            REPORTER_ASSERT(reporter, 0 == releaseTestValue);
-        }
-
-        lazyProxy.reset();
-        if (LazyType::kDeinstantiate == lazyType) {
-            REPORTER_ASSERT(reporter, 2 == releaseTestValue);
-        } else {
-            REPORTER_ASSERT(reporter, 1 == releaseTestValue);
-        }
-
-        ctx->deleteBackendTexture(backendTex);
-    }
-}
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index 62d4bf1..f5d3ce6 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -306,7 +306,7 @@
 
         fAtlasProxy = GrProxyProvider::MakeFullyLazyProxy(
                 [format](GrResourceProvider* resourceProvider)
-                        -> GrSurfaceProxy::LazyInstantiationResult {
+                        -> GrSurfaceProxy::LazyCallbackResult {
                     GrSurfaceDesc desc;
                     // TODO: until partial flushes in MDB lands we're stuck having
                     // all 9 atlas draws occur
@@ -324,9 +324,9 @@
                 GrProtected::kNo,
                 kBottomLeft_GrSurfaceOrigin,
                 kRGBA_8888_GrPixelConfig,
-                *proxyProvider->caps());
+                *proxyProvider->caps(),
+                GrSurfaceProxy::UseAllocator::kNo);
 
-        fAtlasProxy->priv().setIgnoredByResourceAllocator();
         return fAtlasProxy;
     }
 
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index b7f1125..4cc0b28 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -177,7 +177,7 @@
             {
                 sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
                         format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin,
-                        SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo);
+                        GrMipMapped::kNo, SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo);
 
                 {
                     SkTArray<sk_sp<GrTextureProxy>> proxies;
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index e4f95bc..6622354 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -140,7 +140,7 @@
 
     {
         sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
-                format, desc, GrRenderable::kYes, 1, kBottomLeft_GrSurfaceOrigin,
+                format, desc, GrRenderable::kYes, 1, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo,
                 SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
 
         // Both RenderTarget and Texture
@@ -154,7 +154,7 @@
 
     {
         sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
-                format, desc, GrRenderable::kYes, 1, kBottomLeft_GrSurfaceOrigin,
+                format, desc, GrRenderable::kYes, 1, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo,
                 SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
 
         // Both RenderTarget and Texture - but via GrTextureProxy
@@ -168,8 +168,8 @@
 
     {
         sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
-                format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, SkBackingFit::kApprox,
-                SkBudgeted::kYes, GrProtected::kNo);
+                format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
+                SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
         // Texture-only
         GrTextureProxy* tProxy = proxy->asTextureProxy();
         REPORTER_ASSERT(reporter, tProxy);
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index b5cf20e..da4729e 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -45,8 +45,8 @@
     const GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kRGBA_8888,
                                                                  GrRenderable::kYes);
     return proxyProvider->createProxy(format, desc, GrRenderable::kYes, 1,
-                                      kBottomLeft_GrSurfaceOrigin, SkBackingFit::kApprox,
-                                      SkBudgeted::kYes, GrProtected::kNo);
+                                      kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo,
+                                      SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
 }
 
 static sk_sp<GrTextureProxy> make_wrapped(GrContext* context) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 3c2bbd5..54e4322 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -149,8 +149,8 @@
                                 }
 
                                 sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
-                                        format, desc, GrRenderable::kYes, numSamples, origin, fit,
-                                        budgeted, GrProtected::kNo);
+                                        format, desc, GrRenderable::kYes, numSamples, origin,
+                                        GrMipMapped::kNo, fit, budgeted, GrProtected::kNo);
                                 REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
                                 if (proxy) {
                                     REPORTER_ASSERT(reporter, proxy->asRenderTargetProxy());
@@ -188,8 +188,8 @@
                                 }
 
                                 sk_sp<GrTextureProxy> proxy(proxyProvider->createProxy(
-                                        format, desc, GrRenderable::kNo, numSamples, origin, fit,
-                                        budgeted, GrProtected::kNo));
+                                        format, desc, GrRenderable::kNo, numSamples, origin,
+                                        GrMipMapped::kNo, fit, budgeted, GrProtected::kNo));
                                 REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
                                 if (proxy) {
                                     // This forces the proxy to compute and cache its
@@ -390,8 +390,8 @@
                                 renderable);
 
                     sk_sp<GrTextureProxy> proxy = provider->createProxy(
-                            format, desc, renderable, 1, kBottomLeft_GrSurfaceOrigin, fit,
-                            SkBudgeted::kNo, GrProtected::kNo);
+                            format, desc, renderable, 1, kBottomLeft_GrSurfaceOrigin,
+                            GrMipMapped::kNo, fit, SkBudgeted::kNo, GrProtected::kNo);
                     REPORTER_ASSERT(reporter, !proxy);
                 }
             }
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index c175a8d..c21783c 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -11,7 +11,6 @@
 
 #include "include/gpu/GrTexture.h"
 #include "src/gpu/GrContextPriv.h"
-#include "src/gpu/GrDeinstantiateProxyTracker.h"
 #include "src/gpu/GrGpu.h"
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrResourceAllocator.h"
@@ -43,8 +42,8 @@
 
     const GrBackendFormat format = caps->getDefaultBackendFormat(p.fColorType, p.fRenderable);
 
-    return proxyProvider->createProxy(format, desc, p.fRenderable, p.fSampleCnt, p.fOrigin, p.fFit,
-                                      p.fBudgeted, GrProtected::kNo);
+    return proxyProvider->createProxy(format, desc, p.fRenderable, p.fSampleCnt, p.fOrigin,
+                                      GrMipMapped::kNo, p.fFit, p.fBudgeted, GrProtected::kNo);
 }
 
 static sk_sp<GrSurfaceProxy> make_backend(GrContext* context, const ProxyParams& p,
@@ -76,8 +75,7 @@
 static void overlap_test(skiatest::Reporter* reporter, GrResourceProvider* resourceProvider,
                          sk_sp<GrSurfaceProxy> p1, sk_sp<GrSurfaceProxy> p2,
                          bool expectedResult) {
-    GrDeinstantiateProxyTracker deinstantiateTracker;
-    GrResourceAllocator alloc(resourceProvider, &deinstantiateTracker SkDEBUGCODE(, 1));
+    GrResourceAllocator alloc(resourceProvider SkDEBUGCODE(, 1));
 
     alloc.addInterval(p1.get(), 0, 4, GrResourceAllocator::ActualUse::kYes);
     alloc.incOps();
@@ -103,8 +101,7 @@
 static void non_overlap_test(skiatest::Reporter* reporter, GrResourceProvider* resourceProvider,
                              sk_sp<GrSurfaceProxy> p1, sk_sp<GrSurfaceProxy> p2,
                              bool expectedResult) {
-    GrDeinstantiateProxyTracker deinstantiateTracker;
-    GrResourceAllocator alloc(resourceProvider, &deinstantiateTracker SkDEBUGCODE(, 1));
+    GrResourceAllocator alloc(resourceProvider SkDEBUGCODE(, 1));
 
     alloc.incOps();
     alloc.incOps();
@@ -269,7 +266,7 @@
 }
 
 sk_sp<GrSurfaceProxy> make_lazy(GrProxyProvider* proxyProvider, const GrCaps* caps,
-                                const ProxyParams& p, bool deinstantiate) {
+                                const ProxyParams& p) {
     GrPixelConfig config = GrColorTypeToPixelConfig(p.fColorType);
     const auto format = caps->getDefaultBackendFormat(p.fColorType, p.fRenderable);
 
@@ -290,58 +287,13 @@
                                                       SkBudgeted::kNo, GrProtected::kNo,
                                                       GrResourceProvider::Flags::kNoPendingIO);
         }
-        return GrSurfaceProxy::LazyInstantiationResult(std::move(texture));
+        return GrSurfaceProxy::LazyCallbackResult(std::move(texture));
     };
-    auto lazyType = deinstantiate ? GrSurfaceProxy::LazyInstantiationType ::kDeinstantiate
-                                  : GrSurfaceProxy::LazyInstantiationType ::kSingleUse;
     GrInternalSurfaceFlags flags = GrInternalSurfaceFlags::kNone;
     return proxyProvider->createLazyProxy(
             callback, format, desc, p.fRenderable, p.fSampleCnt, p.fOrigin, GrMipMapped::kNo,
-            GrMipMapsStatus::kNotAllocated, flags, p.fFit, p.fBudgeted, GrProtected::kNo, lazyType);
-}
-
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(LazyDeinstantiation, reporter, ctxInfo) {
-    GrContext* context = ctxInfo.grContext();
-    GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider();
-    ProxyParams texParams;
-    texParams.fFit = SkBackingFit::kExact;
-    texParams.fOrigin = kTopLeft_GrSurfaceOrigin;
-    texParams.fColorType = GrColorType::kRGBA_8888;
-    texParams.fRenderable = GrRenderable::kNo;
-    texParams.fSampleCnt = 1;
-    texParams.fSize = 100;
-    texParams.fBudgeted = SkBudgeted::kNo;
-    auto proxyProvider = context->priv().proxyProvider();
-    auto caps = context->priv().caps();
-    auto p0 = make_lazy(proxyProvider, caps, texParams, true);
-    auto p1 = make_lazy(proxyProvider, caps, texParams, false);
-    ProxyParams rtParams = texParams;
-    rtParams.fRenderable = GrRenderable::kYes;
-    rtParams.fFit = SkBackingFit::kApprox;
-    auto p2 = make_lazy(proxyProvider, caps, rtParams, true);
-    auto p3 = make_lazy(proxyProvider, caps, rtParams, false);
-
-    GrDeinstantiateProxyTracker deinstantiateTracker;
-    {
-        GrResourceAllocator alloc(resourceProvider, &deinstantiateTracker SkDEBUGCODE(, 1));
-        alloc.addInterval(p0.get(), 0, 1, GrResourceAllocator::ActualUse::kNo);
-        alloc.addInterval(p1.get(), 0, 1, GrResourceAllocator::ActualUse::kNo);
-        alloc.addInterval(p2.get(), 0, 1, GrResourceAllocator::ActualUse::kNo);
-        alloc.addInterval(p3.get(), 0, 1, GrResourceAllocator::ActualUse::kNo);
-        alloc.incOps();
-        alloc.markEndOfOpsTask(0);
-
-        alloc.determineRecyclability();
-
-        int startIndex, stopIndex;
-        GrResourceAllocator::AssignError error;
-        alloc.assign(&startIndex, &stopIndex, &error);
-    }
-    deinstantiateTracker.deinstantiateAllProxies();
-    REPORTER_ASSERT(reporter, !p0->isInstantiated());
-    REPORTER_ASSERT(reporter, p1->isInstantiated());
-    REPORTER_ASSERT(reporter, !p2->isInstantiated());
-    REPORTER_ASSERT(reporter, p3->isInstantiated());
+            GrMipMapsStatus::kNotAllocated, flags, p.fFit, p.fBudgeted, GrProtected::kNo,
+            GrSurfaceProxy::UseAllocator::kYes);
 }
 
 // Set up so there are two opsTasks that need to be flushed but the resource allocator thinks
@@ -370,8 +322,7 @@
         sk_sp<GrSurfaceProxy> p3 = make_deferred(proxyProvider, caps, params);
         sk_sp<GrSurfaceProxy> p4 = make_deferred(proxyProvider, caps, params);
 
-        GrDeinstantiateProxyTracker deinstantiateTracker;
-        GrResourceAllocator alloc(resourceProvider, &deinstantiateTracker SkDEBUGCODE(, 2));
+        GrResourceAllocator alloc(resourceProvider SkDEBUGCODE(, 2));
 
         alloc.addInterval(p1.get(), 0, 0, GrResourceAllocator::ActualUse::kYes);
         alloc.incOps();
@@ -447,7 +398,6 @@
     if (!proxyWrapped) {
         return;
     }
-    proxyWrapped->priv().setIgnoredByResourceAllocator();
 
     // Same as above, but we actually need to have at least two intervals that don't go through the
     // resource allocator to expose the index bug.
@@ -458,10 +408,8 @@
         cleanup_backend(ctxInfo.grContext(), backEndTex);
         return;
     }
-    proxyWrapped2->priv().setIgnoredByResourceAllocator();
 
-    GrDeinstantiateProxyTracker deinstantiateTracker;
-    GrResourceAllocator alloc(resourceProvider, &deinstantiateTracker SkDEBUGCODE(, 4));
+    GrResourceAllocator alloc(resourceProvider SkDEBUGCODE(, 4));
 
     alloc.addInterval(proxyWrapped.get(), 0, 0, GrResourceAllocator::ActualUse::kYes);
     alloc.incOps();
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 7f3f0a2..2514b3a 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -1641,8 +1641,9 @@
     auto origin = renderable == GrRenderable::kYes ? kBottomLeft_GrSurfaceOrigin
                                                    : kTopLeft_GrSurfaceOrigin;
 
-    return proxyProvider->createMipMapProxy(format, desc, renderable, sampleCnt, origin,
-                                            SkBudgeted::kYes, GrProtected::kNo);
+    return proxyProvider->createProxy(format, desc, renderable, sampleCnt, origin,
+                                      GrMipMapped::kYes, SkBackingFit::kExact, SkBudgeted::kYes,
+                                      GrProtected::kNo);
 }
 
 // Exercise GrSurface::gpuMemorySize for different combos of MSAA, RT-only,
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index fb3176d..36901a6 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -44,9 +44,9 @@
     const GrSurfaceDesc desc = make_desc();
     GrBackendFormat format = caps->getDefaultBackendFormat(kColorType, GrRenderable::kNo);
 
-    sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format, desc, GrRenderable::kNo, 1,
-                                                             kBottomLeft_GrSurfaceOrigin, fit,
-                                                             SkBudgeted::kYes, GrProtected::kNo);
+    sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
+            format, desc, GrRenderable::kNo, 1, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo, fit,
+            SkBudgeted::kYes, GrProtected::kNo);
     // Only budgeted & wrapped external proxies get to carry uniqueKeys
     REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
     return proxy;
@@ -60,9 +60,9 @@
 
     GrBackendFormat format = caps->getDefaultBackendFormat(kColorType, GrRenderable::kYes);
 
-    sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format, desc, GrRenderable::kYes, 1,
-                                                             kBottomLeft_GrSurfaceOrigin, fit,
-                                                             SkBudgeted::kYes, GrProtected::kNo);
+    sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
+            format, desc, GrRenderable::kYes, 1, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo, fit,
+            SkBudgeted::kYes, GrProtected::kNo);
     // Only budgeted & wrapped external proxies get to carry uniqueKeys
     REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
     return proxy;
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index ea0a524..68d1baf 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -532,8 +532,8 @@
                                                                      GrRenderable::kNo);
 
         sk_sp<GrTextureProxy> temp = proxyProvider->createProxy(
-                format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, SkBackingFit::kApprox,
-                SkBudgeted::kYes, GrProtected::kNo);
+                format, desc, GrRenderable::kNo, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
+                SkBackingFit::kApprox, SkBudgeted::kYes, GrProtected::kNo);
         temp->instantiate(context->priv().resourceProvider());
     }
 
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index 11e9e60..b013add 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -65,8 +65,8 @@
         desc.fWidth = width;
         desc.fHeight = height;
         proxy = context->priv().proxyProvider()->createProxy(format, desc, renderable, 1, origin,
-                                                             SkBackingFit::kExact, SkBudgeted::kYes,
-                                                             GrProtected::kNo);
+                                                             GrMipMapped::kNo, SkBackingFit::kExact,
+                                                             SkBudgeted::kYes, GrProtected::kNo);
         if (!proxy) {
             return nullptr;
         }