Move GrOp::VisitProxyFunc to GrTypesPriv.h GrVisitProxyFunc

This is almost purely a query/replace CL (% the #include juggling).
The VisitProxyFunc is used by more than just the Ops and will probably
still be required in the NGA.

This is a prelude to making all the remaining GrOp-derived classes OGA-only.

Bug: skia:11837
Change-Id: If1c127e5c126c676be529ed2a61dd7953abb03d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419162
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 2858a6e..fe31a17 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -66,7 +66,7 @@
                 &GrUserStencilSettings::kUnused, caps, clampType, &fColor);
     }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index de8e2ef..3354035 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -19,6 +19,7 @@
 
 class GrBackendFormat;
 class GrCaps;
+class GrSurfaceProxy;
 
 // The old libstdc++ uses the draft name "monotonic_clock" rather than "steady_clock". This might
 // not actually be monotonic, depending on how libstdc++ was built. However, this is only currently
@@ -1314,6 +1315,8 @@
 };
 GR_MAKE_BITFIELD_CLASS_OPS(GrDstSampleFlags)
 
+using GrVisitProxyFunc = std::function<void(GrSurfaceProxy*, GrMipmapped)>;
+
 #if defined(SK_DEBUG) || GR_TEST_UTILS || defined(SK_ENABLE_DUMP_GPU)
 static constexpr const char* GrBackendApiToStr(GrBackendApi api) {
     switch (api) {
diff --git a/samplecode/SamplePathTessellators.cpp b/samplecode/SamplePathTessellators.cpp
index e154694..8b847c1 100644
--- a/samplecode/SamplePathTessellators.cpp
+++ b/samplecode/SamplePathTessellators.cpp
@@ -56,7 +56,7 @@
         this->setBounds(drawBounds, HasAABloat::kNo, IsHairline::kNo);
     }
     const char* name() const override { return "SamplePathTessellatorOp"; }
-    void visitProxies(const VisitProxyFunc& fn) const override {}
+    void visitProxies(const GrVisitProxyFunc&) const override {}
     FixedFunctionFlags fixedFunctionFlags() const override {
         return FixedFunctionFlags::kUsesHWAA;
     }
diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp
index d0bb09a..4c8790e 100644
--- a/src/core/SkMaskFilter.cpp
+++ b/src/core/SkMaskFilter.cpp
@@ -20,6 +20,7 @@
 
 #if SK_SUPPORT_GPU
 #include "src/gpu/GrFragmentProcessor.h"
+#include "src/gpu/GrSurfaceProxyView.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/text/GrSDFMaskFilter.h"
 #endif
diff --git a/src/gpu/GrAppliedClip.h b/src/gpu/GrAppliedClip.h
index e8ccc2d..8004b0e 100644
--- a/src/gpu/GrAppliedClip.h
+++ b/src/gpu/GrAppliedClip.h
@@ -146,7 +146,7 @@
     }
     bool operator!=(const GrAppliedClip& that) const { return !(*this == that); }
 
-    void visitProxies(const GrOp::VisitProxyFunc& func) const {
+    void visitProxies(const GrVisitProxyFunc& func) const {
         if (fCoverageFP != nullptr) {
             fCoverageFP->visitProxies(func);
         }
diff --git a/src/gpu/GrCopyRenderTask.h b/src/gpu/GrCopyRenderTask.h
index f6e6e06..5df803d 100644
--- a/src/gpu/GrCopyRenderTask.h
+++ b/src/gpu/GrCopyRenderTask.h
@@ -41,8 +41,8 @@
     const char* name() const final { return "Copy"; }
 #endif
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {
-        fn(fSrc.get(), GrMipmapped::kNo);
+    void visitProxies_debugOnly(const GrVisitProxyFunc& func) const override {
+        func(fSrc.get(), GrMipmapped::kNo);
     }
 #endif
 
diff --git a/src/gpu/GrDDLTask.h b/src/gpu/GrDDLTask.h
index e94d5d0..5aceb5e 100644
--- a/src/gpu/GrDDLTask.h
+++ b/src/gpu/GrDDLTask.h
@@ -64,7 +64,7 @@
     const char* name() const final { return "DDL"; }
 #endif
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {}
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override {}
 #endif
 
     sk_sp<const SkDeferredDisplayList> fDDL;
diff --git a/src/gpu/GrDataUtils.cpp b/src/gpu/GrDataUtils.cpp
index e5a7adf..af50a15 100644
--- a/src/gpu/GrDataUtils.cpp
+++ b/src/gpu/GrDataUtils.cpp
@@ -16,9 +16,11 @@
 #include "src/core/SkTLazy.h"
 #include "src/core/SkTraceEvent.h"
 #include "src/core/SkUtils.h"
+#include "src/gpu/GrCaps.h"
 #include "src/gpu/GrColor.h"
 #include "src/gpu/GrImageInfo.h"
 #include "src/gpu/GrPixmap.h"
+#include "src/gpu/GrSwizzle.h"
 
 struct ETC1Block {
     uint32_t fHigh;
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index db201ca..84d229a 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -44,7 +44,7 @@
     return true;
 }
 
-void GrFragmentProcessor::visitProxies(const GrOp::VisitProxyFunc& func) const {
+void GrFragmentProcessor::visitProxies(const GrVisitProxyFunc& func) const {
     this->visitTextureEffects([&func](const GrTextureEffect& te) {
         func(te.view().proxy(), te.samplerState().mipmapped());
     });
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index 87eb9ca..ff27b17 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -12,7 +12,6 @@
 
 #include "include/private/SkSLSampleUsage.h"
 #include "src/gpu/GrProcessor.h"
-#include "src/gpu/ops/GrOp.h"
 
 class GrGLSLFragmentProcessor;
 class GrPaint;
@@ -258,7 +257,7 @@
      */
     bool isEqual(const GrFragmentProcessor& that) const;
 
-    void visitProxies(const GrOp::VisitProxyFunc& func) const;
+    void visitProxies(const GrVisitProxyFunc&) const;
 
     void visitTextureEffects(const std::function<void(const GrTextureEffect&)>&) const;
 
diff --git a/src/gpu/GrMemoryPool.cpp b/src/gpu/GrMemoryPool.cpp
index 7a6b7e6..21be212 100644
--- a/src/gpu/GrMemoryPool.cpp
+++ b/src/gpu/GrMemoryPool.cpp
@@ -9,7 +9,6 @@
 
 #include "include/private/SkTPin.h"
 #include "src/core/SkASAN.h"
-#include "src/gpu/ops/GrOp.h"
 
 #ifdef SK_DEBUG
     #include <atomic>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 5c0c7ef..9e00676 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -128,7 +128,7 @@
     fBounds = fList.head()->bounds();
 }
 
-void GrOpsTask::OpChain::visitProxies(const GrOp::VisitProxyFunc& func) const {
+void GrOpsTask::OpChain::visitProxies(const GrVisitProxyFunc& func) const {
     if (fList.empty()) {
         return;
     }
@@ -853,7 +853,7 @@
 #endif
 
 #ifdef SK_DEBUG
-void GrOpsTask::visitProxies_debugOnly(const GrOp::VisitProxyFunc& func) const {
+void GrOpsTask::visitProxies_debugOnly(const GrVisitProxyFunc& func) const {
     auto textureFunc = [ func ] (GrSurfaceProxy* tex, GrMipmapped mipmapped) {
         func(tex, mipmapped);
     };
diff --git a/src/gpu/GrOpsTask.h b/src/gpu/GrOpsTask.h
index 37c9734..6c93c0c 100644
--- a/src/gpu/GrOpsTask.h
+++ b/src/gpu/GrOpsTask.h
@@ -93,7 +93,7 @@
 
 #ifdef SK_DEBUG
     int numClips() const override { return fNumClips; }
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const override;
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override;
 #endif
 
 #if GR_TEST_UTILS
@@ -155,7 +155,7 @@
         OpChain(OpChain&&) = default;
         OpChain& operator=(OpChain&&) = default;
 
-        void visitProxies(const GrOp::VisitProxyFunc&) const;
+        void visitProxies(const GrVisitProxyFunc&) const;
 
         GrOp* head() const { return fList.head(); }
 
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 3b2bbae..0555c23 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -15,8 +15,6 @@
 #include "src/gpu/glsl/GrGLSLProgramDataManager.h"
 #include "src/gpu/glsl/GrGLSLUniformHandler.h"
 
-#include "src/gpu/ops/GrOp.h"
-
 GrPipeline::GrPipeline(const InitArgs& args,
                        sk_sp<const GrXferProcessor> xferProcessor,
                        const GrAppliedHardClip& hardClip)
@@ -108,7 +106,7 @@
     }
 }
 
-void GrPipeline::visitProxies(const GrOp::VisitProxyFunc& func) const {
+void GrPipeline::visitProxies(const GrVisitProxyFunc& func) const {
     // This iteration includes any clip coverage FPs
     for (auto& fp : fFragmentProcessors) {
         fp->visitProxies(func);
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index c7172da..e43de9e 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -205,7 +205,7 @@
 
     const GrSwizzle& writeSwizzle() const { return fWriteSwizzle; }
 
-    void visitProxies(const GrOp::VisitProxyFunc&) const;
+    void visitProxies(const GrVisitProxyFunc&) const;
 
     void setDstTextureUniforms(const GrGLSLProgramDataManager& pdm,
                                GrGLSLBuiltinUniformHandles* fBuiltinUniformHandles) const;
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp
index 9377ef0..43b3a84 100644
--- a/src/gpu/GrProcessorSet.cpp
+++ b/src/gpu/GrProcessorSet.cpp
@@ -196,7 +196,7 @@
     return analysis;
 }
 
-void GrProcessorSet::visitProxies(const GrOp::VisitProxyFunc& func) const {
+void GrProcessorSet::visitProxies(const GrVisitProxyFunc& func) const {
     if (this->hasColorFragmentProcessor()) {
         fColorFragmentProcessor->visitProxies(func);
     }
diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h
index d0b213a..7f29a58 100644
--- a/src/gpu/GrProcessorSet.h
+++ b/src/gpu/GrProcessorSet.h
@@ -154,7 +154,7 @@
     SkString dumpProcessors() const;
 #endif
 
-    void visitProxies(const GrOp::VisitProxyFunc& func) const;
+    void visitProxies(const GrVisitProxyFunc&) const;
 
 private:
     GrProcessorSet(Empty) : fXP((const GrXferProcessor*)nullptr), fFlags(kFinalized_Flag) {}
diff --git a/src/gpu/GrProgramInfo.h b/src/gpu/GrProgramInfo.h
index f03e275..09bb067 100644
--- a/src/gpu/GrProgramInfo.h
+++ b/src/gpu/GrProgramInfo.h
@@ -88,7 +88,7 @@
 
     // Invokes the visitor function on all FP proxies in the pipeline. The caller is responsible
     // to call the visitor on its own primProc proxies.
-    void visitFPProxies(const GrOp::VisitProxyFunc& func) const { fPipeline->visitProxies(func); }
+    void visitFPProxies(const GrVisitProxyFunc& func) const { fPipeline->visitProxies(func); }
 
 #ifdef SK_DEBUG
     void validate(bool flushTime) const;
diff --git a/src/gpu/GrRenderTask.h b/src/gpu/GrRenderTask.h
index 7335de0..e5855c0 100644
--- a/src/gpu/GrRenderTask.h
+++ b/src/gpu/GrRenderTask.h
@@ -14,7 +14,6 @@
 #include "src/gpu/GrSurfaceProxyView.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/GrTextureResolveManager.h"
-#include "src/gpu/ops/GrOp.h"
 
 class GrMockRenderTask;
 class GrOpFlushState;
@@ -116,12 +115,12 @@
 #ifdef SK_DEBUG
     virtual int numClips() const { return 0; }
 
-    virtual void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const = 0;
+    virtual void visitProxies_debugOnly(const GrVisitProxyFunc&) const = 0;
 
-    void visitTargetAndSrcProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const {
-        this->visitProxies_debugOnly(fn);
+    void visitTargetAndSrcProxies_debugOnly(const GrVisitProxyFunc& func) const {
+        this->visitProxies_debugOnly(func);
         for (const sk_sp<GrSurfaceProxy>& target : fTargets) {
-            fn(target.get(), GrMipmapped::kNo);
+            func(target.get(), GrMipmapped::kNo);
         }
     }
 #endif
diff --git a/src/gpu/GrTextureResolveRenderTask.cpp b/src/gpu/GrTextureResolveRenderTask.cpp
index fd13d65..f079994 100644
--- a/src/gpu/GrTextureResolveRenderTask.cpp
+++ b/src/gpu/GrTextureResolveRenderTask.cpp
@@ -91,5 +91,5 @@
 }
 
 #ifdef SK_DEBUG
-void GrTextureResolveRenderTask::visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const {}
+void GrTextureResolveRenderTask::visitProxies_debugOnly(const GrVisitProxyFunc&) const {}
 #endif
diff --git a/src/gpu/GrTextureResolveRenderTask.h b/src/gpu/GrTextureResolveRenderTask.h
index ab6e7f5..dd5f5d3 100644
--- a/src/gpu/GrTextureResolveRenderTask.h
+++ b/src/gpu/GrTextureResolveRenderTask.h
@@ -33,7 +33,7 @@
     const char* name() const final { return "TextureResolve"; }
 #endif
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const override;
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override;
 #endif
 
     struct Resolve {
diff --git a/src/gpu/GrTransferFromRenderTask.h b/src/gpu/GrTransferFromRenderTask.h
index 08513bf..52af6a5 100644
--- a/src/gpu/GrTransferFromRenderTask.h
+++ b/src/gpu/GrTransferFromRenderTask.h
@@ -43,8 +43,8 @@
     const char* name() const final { return "TransferFrom"; }
 #endif
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {
-        fn(fSrcProxy.get(), GrMipmapped::kNo);
+    void visitProxies_debugOnly(const GrVisitProxyFunc& func) const override {
+        func(fSrcProxy.get(), GrMipmapped::kNo);
     }
 #endif
 
diff --git a/src/gpu/GrWaitRenderTask.h b/src/gpu/GrWaitRenderTask.h
index c32a581..84eddea 100644
--- a/src/gpu/GrWaitRenderTask.h
+++ b/src/gpu/GrWaitRenderTask.h
@@ -38,7 +38,7 @@
 #endif
 #ifdef SK_DEBUG
     // No non-dst proxies.
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {}
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override {}
 #endif
     std::unique_ptr<std::unique_ptr<GrSemaphore>[]> fSemaphores;
     int fNumSemaphores;
diff --git a/src/gpu/GrWritePixelsRenderTask.h b/src/gpu/GrWritePixelsRenderTask.h
index 79a4c7e..7076941 100644
--- a/src/gpu/GrWritePixelsRenderTask.h
+++ b/src/gpu/GrWritePixelsRenderTask.h
@@ -38,7 +38,7 @@
     const char* name() const final { return "WritePixels"; }
 #endif
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc& fn) const override {}
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override {}
 #endif
 
     SkAutoSTArray<16, GrMipLevel> fLevels;
diff --git a/src/gpu/effects/GrTextureEffect.h b/src/gpu/effects/GrTextureEffect.h
index 731265b..4c0cefb 100644
--- a/src/gpu/effects/GrTextureEffect.h
+++ b/src/gpu/effects/GrTextureEffect.h
@@ -11,6 +11,7 @@
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "src/gpu/GrFragmentProcessor.h"
+#include "src/gpu/GrSurfaceProxyView.h"
 #include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
 
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
index 4daedb3..c9a886b 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
@@ -7,6 +7,7 @@
 
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/gpu/GrProcessor.h"
+#include "src/gpu/GrShaderCaps.h"
 #include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/glsl/GrGLSLUniformHandler.h"
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.h b/src/gpu/glsl/GrGLSLGeometryProcessor.h
index bf1d62a..957ccec 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.h
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.h
@@ -10,6 +10,7 @@
 
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/gpu/GrGeometryProcessor.h"
+#include "src/gpu/GrShaderCaps.h"
 #include "src/gpu/glsl/GrGLSLProgramDataManager.h"
 #include "src/gpu/glsl/GrGLSLUniformHandler.h"
 
diff --git a/src/gpu/mock/GrMockRenderTask.h b/src/gpu/mock/GrMockRenderTask.h
index ea20f7e..378dbcd 100644
--- a/src/gpu/mock/GrMockRenderTask.h
+++ b/src/gpu/mock/GrMockRenderTask.h
@@ -23,7 +23,7 @@
 
     // Overrides.
 #ifdef SK_DEBUG
-    void visitProxies_debugOnly(const GrOp::VisitProxyFunc&) const override { return; }
+    void visitProxies_debugOnly(const GrVisitProxyFunc&) const override { return; }
 #endif
     void gatherProxyIntervals(GrResourceAllocator*) const override {}
     ExpectedOutcome onMakeClosed(const GrCaps&, SkIRect*) override { SkUNREACHABLE; }
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 2ea3902..21c712c 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -732,7 +732,7 @@
 
     const char* name() const override { return "AAConvexPathOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index 070d93a..7c2a79b 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -843,7 +843,7 @@
 
     const char* name() const override { return "AAHairlineOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
 
         bool visited = false;
         for (int i = 0; i < 3; ++i) {
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 449b818..780fa80 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -179,7 +179,7 @@
 
     const char* name() const override { return "AAFlatteningConvexPathOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 9f9ed83..bd5adf4 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -133,7 +133,7 @@
             dst, offset, count, fColor.toBytes_RGBA(), positionMatrix, fClipRect);
 }
 
-void GrAtlasTextOp::visitProxies(const VisitProxyFunc& func) const {
+void GrAtlasTextOp::visitProxies(const GrVisitProxyFunc& func) const {
     fProcessors.visitProxies(func);
 }
 
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index 6c41299..bd0c46e 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -96,7 +96,7 @@
 
     const char* name() const override { return "AtlasTextOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override;
+    void visitProxies(const GrVisitProxyFunc&) const override;
 
     FixedFunctionFlags fixedFunctionFlags() const override;
 
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index d80bf99..1ae324e 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -234,7 +234,7 @@
 
     const char* name() const override { return "DashOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index 5775849..e84e38f 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -378,7 +378,7 @@
 
     const char* name() const override { return "DefaultPathOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp
index f537749..1b11b06 100644
--- a/src/gpu/ops/GrDrawAtlasOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasOp.cpp
@@ -36,7 +36,7 @@
 
     const char* name() const override { return "DrawAtlasOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index 514d2e9..97c60d3 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -216,7 +216,7 @@
 
     const char* name() const override { return "DrawVerticesOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrFillRRectOp.cpp b/src/gpu/ops/GrFillRRectOp.cpp
index 054dbdf..a965055 100644
--- a/src/gpu/ops/GrFillRRectOp.cpp
+++ b/src/gpu/ops/GrFillRRectOp.cpp
@@ -45,11 +45,11 @@
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) final;
     CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) final;
 
-    void visitProxies(const VisitProxyFunc& fn) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
-            fProgramInfo->visitFPProxies(fn);
+            fProgramInfo->visitFPProxies(func);
         } else {
-            fHelper.visitProxies(fn);
+            fHelper.visitProxies(func);
         }
     }
 
diff --git a/src/gpu/ops/GrFillRectOp.cpp b/src/gpu/ops/GrFillRectOp.cpp
index 50abd19..555654f 100644
--- a/src/gpu/ops/GrFillRectOp.cpp
+++ b/src/gpu/ops/GrFillRectOp.cpp
@@ -110,7 +110,7 @@
 
     const char* name() const override { return "FillRectOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index 2e21b98..6fd6371 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -166,7 +166,7 @@
 
     const char* name() const override { return "NonAALatticeOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         func(fView.proxy(), GrMipmapped::kNo);
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 56ef871..6dbb9b9 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -92,9 +92,7 @@
 
     virtual const char* name() const = 0;
 
-    using VisitProxyFunc = std::function<void(GrSurfaceProxy*, GrMipmapped)>;
-
-    virtual void visitProxies(const VisitProxyFunc&) const {
+    virtual void visitProxies(const GrVisitProxyFunc&) const {
         // This default implementation assumes the op has no proxies
     }
 
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index bc6b603..843b54d 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -1250,7 +1250,7 @@
 
     const char* name() const override { return "CircleOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -1612,7 +1612,7 @@
 
     const char* name() const override { return "ButtCappedDashedCircleOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -1943,7 +1943,7 @@
 
     const char* name() const override { return "EllipseOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -2219,7 +2219,7 @@
 
     const char* name() const override { return "DIEllipseOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -2569,7 +2569,7 @@
 
     const char* name() const override { return "CircularRRectOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -2941,7 +2941,7 @@
 
     const char* name() const override { return "EllipticalRRectOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrRegionOp.cpp b/src/gpu/ops/GrRegionOp.cpp
index 210b02e..e8947b8 100644
--- a/src/gpu/ops/GrRegionOp.cpp
+++ b/src/gpu/ops/GrRegionOp.cpp
@@ -64,7 +64,7 @@
 
     const char* name() const override { return "GrRegionOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp
index 36c001b..707a824 100644
--- a/src/gpu/ops/GrShadowRRectOp.cpp
+++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -639,7 +639,7 @@
     }
 #endif
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         func(fFalloffView.proxy(), GrMipmapped(false));
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
index 77e5f64..9ea1180 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h
@@ -95,7 +95,7 @@
 
     bool compatibleWithCoverageAsAlpha() const { return fCompatibleWithCoverageAsAlpha; }
 
-    void visitProxies(const GrOp::VisitProxyFunc& func) const {
+    void visitProxies(const GrVisitProxyFunc& func) const {
         if (fProcessors) {
             fProcessors->visitProxies(func);
         }
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 030a5ab..83d65d8 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -137,7 +137,7 @@
 
     const char* name() const override { return "SmallPathOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         fHelper.visitProxies(func);
     }
 
diff --git a/src/gpu/ops/GrStrokeRectOp.cpp b/src/gpu/ops/GrStrokeRectOp.cpp
index 7db95ff..d8eeab5 100644
--- a/src/gpu/ops/GrStrokeRectOp.cpp
+++ b/src/gpu/ops/GrStrokeRectOp.cpp
@@ -91,7 +91,7 @@
 
     const char* name() const override { return "NonAAStrokeRectOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
@@ -417,7 +417,7 @@
 
     const char* name() const override { return "AAStrokeRect"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index 749d601..9b59baf 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -263,7 +263,7 @@
 
     const char* name() const override { return "TextureOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         bool mipped = (fMetadata.mipmapMode() != GrSamplerState::MipmapMode::kNone);
         for (unsigned p = 0; p <  fMetadata.fProxyCount; ++p) {
             func(fViewCountPairs[p].fProxy.get(), GrMipmapped(mipped));
diff --git a/src/gpu/ops/GrTriangulatingPathRenderer.cpp b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
index fdc594c..3bc5e6c 100644
--- a/src/gpu/ops/GrTriangulatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
@@ -224,7 +224,7 @@
 
     const char* name() const override { return "TriangulatingPathOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/src/gpu/tessellate/GrDrawAtlasPathOp.h b/src/gpu/tessellate/GrDrawAtlasPathOp.h
index d41c4e4..98fbaed 100644
--- a/src/gpu/tessellate/GrDrawAtlasPathOp.h
+++ b/src/gpu/tessellate/GrDrawAtlasPathOp.h
@@ -31,9 +31,9 @@
     FixedFunctionFlags fixedFunctionFlags() const override {
         return (fEnableHWAA) ? FixedFunctionFlags::kUsesHWAA : FixedFunctionFlags::kNone;
     }
-    void visitProxies(const VisitProxyFunc& fn) const override {
-        fn(fAtlasProxy.get(), GrMipmapped::kNo);
-        fProcessors.visitProxies(fn);
+    void visitProxies(const GrVisitProxyFunc& func) const override {
+        func(fAtlasProxy.get(), GrMipmapped::kNo);
+        fProcessors.visitProxies(func);
     }
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
     CombineResult onCombineIfPossible(GrOp*, SkArenaAlloc*, const GrCaps&) override;
diff --git a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
index 41054fe..13ea431 100644
--- a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
+++ b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
@@ -109,11 +109,11 @@
 
 }  // namespace
 
-void GrPathInnerTriangulateOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrPathInnerTriangulateOp::visitProxies(const GrVisitProxyFunc& func) const {
     if (fPipelineForFills) {
-        fPipelineForFills->visitProxies(fn);
+        fPipelineForFills->visitProxies(func);
     } else {
-        fProcessors.visitProxies(fn);
+        fProcessors.visitProxies(func);
     }
 }
 
diff --git a/src/gpu/tessellate/GrPathInnerTriangulateOp.h b/src/gpu/tessellate/GrPathInnerTriangulateOp.h
index 30b296e..b0ca473 100644
--- a/src/gpu/tessellate/GrPathInnerTriangulateOp.h
+++ b/src/gpu/tessellate/GrPathInnerTriangulateOp.h
@@ -41,7 +41,7 @@
     }
 
     const char* name() const override { return "GrPathInnerTriangulateOp"; }
-    void visitProxies(const VisitProxyFunc& fn) const override;
+    void visitProxies(const GrVisitProxyFunc&) const override;
     FixedFunctionFlags fixedFunctionFlags() const override;
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
 
diff --git a/src/gpu/tessellate/GrPathStencilCoverOp.cpp b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
index 525092c..823296d 100644
--- a/src/gpu/tessellate/GrPathStencilCoverOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
@@ -63,11 +63,11 @@
 
 }  // namespace
 
-void GrPathStencilCoverOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrPathStencilCoverOp::visitProxies(const GrVisitProxyFunc& func) const {
     if (fCoverBBoxProgram) {
-        fCoverBBoxProgram->pipeline().visitProxies(fn);
+        fCoverBBoxProgram->pipeline().visitProxies(func);
     } else {
-        fProcessors.visitProxies(fn);
+        fProcessors.visitProxies(func);
     }
 }
 
diff --git a/src/gpu/tessellate/GrPathStencilCoverOp.h b/src/gpu/tessellate/GrPathStencilCoverOp.h
index 968884b..6460873 100644
--- a/src/gpu/tessellate/GrPathStencilCoverOp.h
+++ b/src/gpu/tessellate/GrPathStencilCoverOp.h
@@ -35,7 +35,7 @@
     }
 
     const char* name() const override { return "GrPathStencilCoverOp"; }
-    void visitProxies(const VisitProxyFunc& fn) const override;
+    void visitProxies(const GrVisitProxyFunc&) const override;
     FixedFunctionFlags fixedFunctionFlags() const override;
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
 
diff --git a/src/gpu/tessellate/GrPathTessellateOp.cpp b/src/gpu/tessellate/GrPathTessellateOp.cpp
index 283706e..6230a6a 100644
--- a/src/gpu/tessellate/GrPathTessellateOp.cpp
+++ b/src/gpu/tessellate/GrPathTessellateOp.cpp
@@ -10,11 +10,11 @@
 #include "src/gpu/tessellate/GrPathWedgeTessellator.h"
 #include "src/gpu/tessellate/shaders/GrPathTessellationShader.h"
 
-void GrPathTessellateOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrPathTessellateOp::visitProxies(const GrVisitProxyFunc& func) const {
     if (fTessellationProgram) {
-        fTessellationProgram->pipeline().visitProxies(fn);
+        fTessellationProgram->pipeline().visitProxies(func);
     } else {
-        fProcessors.visitProxies(fn);
+        fProcessors.visitProxies(func);
     }
 }
 
diff --git a/src/gpu/tessellate/GrPathTessellateOp.h b/src/gpu/tessellate/GrPathTessellateOp.h
index 9520406..bbabcbb 100644
--- a/src/gpu/tessellate/GrPathTessellateOp.h
+++ b/src/gpu/tessellate/GrPathTessellateOp.h
@@ -34,7 +34,7 @@
 
     const char* name() const override { return "GrPathTessellateOp"; }
     bool usesMSAA() const override { return fAAType == GrAAType::kMSAA; }
-    void visitProxies(const VisitProxyFunc& fn) const override;
+    void visitProxies(const GrVisitProxyFunc&) const override;
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
     bool usesStencil() const override { return !fStencil->isUnused(); }
 
diff --git a/src/gpu/tessellate/GrStrokeTessellateOp.cpp b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
index fb2526e..24341f4 100644
--- a/src/gpu/tessellate/GrStrokeTessellateOp.cpp
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.cpp
@@ -43,13 +43,13 @@
     this->setBounds(devBounds, HasAABloat::kNo, IsHairline::kNo);
 }
 
-void GrStrokeTessellateOp::visitProxies(const VisitProxyFunc& fn) const {
+void GrStrokeTessellateOp::visitProxies(const GrVisitProxyFunc& func) const {
     if (fFillProgram) {
-        fFillProgram->visitFPProxies(fn);
+        fFillProgram->visitFPProxies(func);
     } else if (fStencilProgram) {
-        fStencilProgram->visitFPProxies(fn);
+        fStencilProgram->visitFPProxies(func);
     } else {
-        fProcessors.visitProxies(fn);
+        fProcessors.visitProxies(func);
     }
 }
 
diff --git a/src/gpu/tessellate/GrStrokeTessellateOp.h b/src/gpu/tessellate/GrStrokeTessellateOp.h
index e8f61e1..b873995 100644
--- a/src/gpu/tessellate/GrStrokeTessellateOp.h
+++ b/src/gpu/tessellate/GrStrokeTessellateOp.h
@@ -42,7 +42,7 @@
     }
 
     const char* name() const override { return "GrStrokeTessellateOp"; }
-    void visitProxies(const VisitProxyFunc& fn) const override;
+    void visitProxies(const GrVisitProxyFunc&) const override;
     bool usesMSAA() const override { return fAAType == GrAAType::kMSAA; }
     GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override;
     bool usesStencil() const override {
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 7f079fe..3000c53 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -20,6 +20,7 @@
 #include "src/shaders/SkBitmapProcShader.h"
 
 #if SK_SUPPORT_GPU
+#include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrBicubicEffect.h"
 #include "src/gpu/effects/GrTextureEffect.h"
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 9a12208..6d1bfef 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -60,7 +60,7 @@
             return GrOp::Make<Op>(context, context, proxyProvider, test, nullTexture);
         }
 
-        void visitProxies(const VisitProxyFunc& func) const override {
+        void visitProxies(const GrVisitProxyFunc& func) const override {
             func(fProxy.get(), GrMipmapped::kNo);
         }
 
@@ -315,7 +315,7 @@
                                                          shouldFailInstantiation);
     }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         func(fLazyProxy.get(), GrMipmapped::kNo);
     }
 
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index f3aa95d..29fb5ee 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -68,7 +68,7 @@
 
     const char* name() const override { return "NonAARectOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 754293c..13f8e28 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -37,7 +37,7 @@
 
     const char* name() const override { return "TestOp"; }
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         fProcessors.visitProxies(func);
     }
 
diff --git a/tools/gpu/TestOps.cpp b/tools/gpu/TestOps.cpp
index 98b5930..8f8a17d 100644
--- a/tools/gpu/TestOps.cpp
+++ b/tools/gpu/TestOps.cpp
@@ -103,7 +103,7 @@
                                       const GrAppliedClip*,
                                       GrClampType) override;
 
-    void visitProxies(const VisitProxyFunc& func) const override {
+    void visitProxies(const GrVisitProxyFunc& func) const override {
         if (fProgramInfo) {
             fProgramInfo->visitFPProxies(func);
         } else {