Move GrMtlBufferManager functionality to better places

This is setting up for handling buffer recycling in the resource provider.

Bug: skia:8243
Change-Id: Ie850b68bdcac455128aa3e89ae8adf62f17bddea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211988
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/mtl/GrMtlGpuCommandBuffer.h b/src/gpu/mtl/GrMtlGpuCommandBuffer.h
index 4e232fa..5a6bc36 100644
--- a/src/gpu/mtl/GrMtlGpuCommandBuffer.h
+++ b/src/gpu/mtl/GrMtlGpuCommandBuffer.h
@@ -16,6 +16,7 @@
 #import <metal/metal.h>
 
 typedef uint32_t GrColor;
+class GrMtlBuffer;
 class GrMtlPipelineState;
 class GrMtlRenderTarget;
 
@@ -121,6 +122,9 @@
                                        const GrBuffer* instanceBuffer, int instanceCount,
                                        int baseInstance, GrPrimitiveRestart) final;
 
+    void setVertexBuffer(id<MTLRenderCommandEncoder>, const GrMtlBuffer*, size_t index);
+    void resetBufferBindings();
+
     GrMtlGpu*                                     fGpu;
     // GrRenderTargetProxy bounds
 #ifdef SK_DEBUG
@@ -138,6 +142,9 @@
 
     CommandBufferInfo fCommandBufferInfo;
 
+    static constexpr size_t kNumBindings = GrMtlUniformHandler::kLastUniformBinding + 3;
+    id<MTLBuffer> fBufferBindings[kNumBindings];
+
     typedef GrGpuRTCommandBuffer INHERITED;
 };