Remove the option of disabling explicit resource allocation

We're burning our boats behind us. Succeed or die trying!

Change-Id: I6a9f71b758a6ae7b090c5221ab12a5ab4d166b47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209647
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp
index e2a4c5c..da23613 100644
--- a/src/gpu/GrOpList.cpp
+++ b/src/gpu/GrOpList.cpp
@@ -24,8 +24,9 @@
     return id;
 }
 
-GrOpList::GrOpList(GrResourceProvider* resourceProvider, sk_sp<GrOpMemoryPool> opMemoryPool,
-                   sk_sp<GrSurfaceProxy> surfaceProxy, GrAuditTrail* auditTrail)
+GrOpList::GrOpList(sk_sp<GrOpMemoryPool> opMemoryPool,
+                   sk_sp<GrSurfaceProxy> surfaceProxy,
+                   GrAuditTrail* auditTrail)
         : fOpMemoryPool(std::move(opMemoryPool))
         , fAuditTrail(auditTrail)
         , fUniqueID(CreateUniqueID())
@@ -34,16 +35,6 @@
     fTarget.setProxy(std::move(surfaceProxy), kWrite_GrIOType);
     fTarget.get()->setLastOpList(this);
 
-    if (resourceProvider && !resourceProvider->explicitlyAllocateGPUResources()) {
-        // MDB TODO: remove this! We are currently moving to having all the ops that target
-        // the RT as a dest (e.g., clear, etc.) rely on the opList's 'fTarget' pointer
-        // for the IO Ref. This works well but until they are all swapped over (and none
-        // are pre-emptively instantiating proxies themselves) we need to instantiate
-        // here so that the GrSurfaces are created in an order that preserves the GrSurface
-        // re-use assumptions.
-        fTarget.get()->instantiate(resourceProvider);
-    }
-
     fTarget.markPendingIO();
 }
 
@@ -56,12 +47,8 @@
 
 // TODO: this can go away when explicit allocation has stuck
 bool GrOpList::instantiate(GrResourceProvider* resourceProvider) {
-    if (resourceProvider->explicitlyAllocateGPUResources()) {
-        SkASSERT(fTarget.get()->isInstantiated());
-        return true;
-    } else {
-        return SkToBool(fTarget.get()->instantiate(resourceProvider));
-    }
+    SkASSERT(fTarget.get()->isInstantiated());
+    return true;
 }
 
 void GrOpList::endFlush() {
@@ -76,11 +63,7 @@
 
 void GrOpList::instantiateDeferredProxies(GrResourceProvider* resourceProvider) {
     for (int i = 0; i < fDeferredProxies.count(); ++i) {
-        if (resourceProvider->explicitlyAllocateGPUResources()) {
-            SkASSERT(fDeferredProxies[i]->isInstantiated());
-        } else {
-            fDeferredProxies[i]->instantiate(resourceProvider);
-        }
+        SkASSERT(fDeferredProxies[i]->isInstantiated());
     }
 }