Have visitProxies take a GrTexutreProxy instead of GrSurfaceProxy.

Change-Id: Ic1508d7909c90298fdb906391f981505c3ed497e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237485
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrCopyRenderTask.h b/src/gpu/GrCopyRenderTask.h
index 319d5da..e2b5d1f 100644
--- a/src/gpu/GrCopyRenderTask.h
+++ b/src/gpu/GrCopyRenderTask.h
@@ -37,7 +37,7 @@
     bool onExecute(GrOpFlushState*) override;
 
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {
+    void visitProxies_debugOnly(const VisitSurfaceProxyFunc& fn) const override {
         fn(fSrcProxy.get(), GrMipMapped::kNo);
     }
 #endif
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 98f0c61..c06a7ae 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -576,9 +576,13 @@
     }
 }
 
-void GrOpsTask::visitProxies_debugOnly(const GrOp::VisitProxyFunc& func) const {
+void GrOpsTask::visitProxies_debugOnly(const VisitSurfaceProxyFunc& func) const {
+    auto textureFunc = [ func ] (GrTextureProxy* tex, GrMipMapped mipmapped) {
+        func(tex, mipmapped);
+    };
+
     for (const OpChain& chain : fOpChains) {
-        chain.visitProxies(func);
+        chain.visitProxies(textureFunc);
     }
 }
 
diff --git a/src/gpu/GrOpsTask.h b/src/gpu/GrOpsTask.h
index a90b7e6..b9398b8 100644
--- a/src/gpu/GrOpsTask.h
+++ b/src/gpu/GrOpsTask.h
@@ -60,7 +60,7 @@
     void addOp(std::unique_ptr<GrOp> op, GrTextureResolveManager textureResolveManager,
                const GrCaps& caps) {
         auto addDependency = [ textureResolveManager, &caps, this ] (
-                GrSurfaceProxy* p, GrMipMapped mipmapped) {
+                GrTextureProxy* p, GrMipMapped mipmapped) {
             this->addDependency(p, mipmapped, textureResolveManager, caps);
         };
 
@@ -79,7 +79,7 @@
                    GrAppliedClip&& clip, const DstProxy& dstProxy,
                    GrTextureResolveManager textureResolveManager, const GrCaps& caps) {
         auto addDependency = [ textureResolveManager, &caps, this ] (
-                GrSurfaceProxy* p, GrMipMapped mipmapped) {
+                GrTextureProxy* p, GrMipMapped mipmapped) {
             this->addDependency(p, mipmapped, textureResolveManager, caps);
         };
 
@@ -97,7 +97,7 @@
 
     SkDEBUGCODE(void dump(bool printDependencies) const override;)
     SkDEBUGCODE(int numClips() const override { return fNumClips; })
-    SkDEBUGCODE(void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const override;)
+    SkDEBUGCODE(void visitProxies_debugOnly(const VisitSurfaceProxyFunc&) const override;)
 
 private:
     bool isNoOp() const {
diff --git a/src/gpu/GrRenderTask.h b/src/gpu/GrRenderTask.h
index 3f66d90..918055f 100644
--- a/src/gpu/GrRenderTask.h
+++ b/src/gpu/GrRenderTask.h
@@ -65,9 +65,11 @@
 
     virtual int numClips() const { return 0; }
 
-    virtual void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const = 0;
+    using VisitSurfaceProxyFunc = std::function<void(GrSurfaceProxy*, GrMipMapped)>;
 
-    void visitTargetAndSrcProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const {
+    virtual void visitProxies_debugOnly(const VisitSurfaceProxyFunc&) const = 0;
+
+    void visitTargetAndSrcProxies_debugOnly(const VisitSurfaceProxyFunc& fn) const {
         this->visitProxies_debugOnly(fn);
         fn(fTarget.get(), GrMipMapped::kNo);
     }
diff --git a/src/gpu/GrTextureResolveRenderTask.h b/src/gpu/GrTextureResolveRenderTask.h
index d3c95d6..29d7eaa 100644
--- a/src/gpu/GrTextureResolveRenderTask.h
+++ b/src/gpu/GrTextureResolveRenderTask.h
@@ -37,7 +37,7 @@
 
 #ifdef SK_DEBUG
     // No non-dst proxies.
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {}
+    void visitProxies_debugOnly(const VisitSurfaceProxyFunc& fn) const override {}
 #endif
 
     const GrTextureResolveFlags fResolveFlags;
diff --git a/src/gpu/GrTransferFromRenderTask.h b/src/gpu/GrTransferFromRenderTask.h
index 08ad678..421206e 100644
--- a/src/gpu/GrTransferFromRenderTask.h
+++ b/src/gpu/GrTransferFromRenderTask.h
@@ -43,7 +43,7 @@
     bool onExecute(GrOpFlushState*) override;
 
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {
+    void visitProxies_debugOnly(const VisitSurfaceProxyFunc& fn) const override {
         fn(fSrcProxy.get(), GrMipMapped::kNo);
     }
 #endif
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 0578994..2eba92b 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -68,7 +68,7 @@
 
     virtual const char* name() const = 0;
 
-    using VisitProxyFunc = std::function<void(GrSurfaceProxy*, GrMipMapped)>;
+    using VisitProxyFunc = std::function<void(GrTextureProxy*, GrMipMapped)>;
 
     virtual void visitProxies(const VisitProxyFunc&) const {
         // This default implementation assumes the op has no proxies