Add support for holding onto refs for input buffers from bindBuffer calls.

Mostly this is a lot of plumbing of sk_sp around instead of const*.

This does allow the d3d and vk backends to hold refs to the GrBuffers that
are bound on a command buffer. This means that our buffer alloc pools will
not try to reuse this buffers until the gpu is done with them. Previously
vk and d3d will sniff out if one of these buffers was being used again
while still active on the gpu and rip out the internal backend buffer and
allocate a new one which is not cheap. We see a lot of perf wins from
not doing this.

Change-Id: I9ffe649151ee43066dce620bd3e2763b029a9811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303583
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ccpr/GrCCCoverageProcessor.h b/src/gpu/ccpr/GrCCCoverageProcessor.h
index fb195c7..36835f6 100644
--- a/src/gpu/ccpr/GrCCCoverageProcessor.h
+++ b/src/gpu/ccpr/GrCCCoverageProcessor.h
@@ -117,7 +117,7 @@
     virtual int numSubpasses() const = 0;
     virtual void reset(PrimitiveType, int subpassIdx, GrResourceProvider*) = 0;
     void bindPipeline(GrOpFlushState*, const GrPipeline&, const SkRect& drawBounds) const;
-    virtual void bindBuffers(GrOpsRenderPass*, const GrBuffer* instanceBuffer) const = 0;
+    virtual void bindBuffers(GrOpsRenderPass*, sk_sp<const GrBuffer> instanceBuffer) const = 0;
     virtual void drawInstances(GrOpsRenderPass*, int instanceCount, int baseInstance) const = 0;
 
     // The Shader provides code to calculate each pixel's coverage in a RenderPass. It also