Refactor GrBufferAllocPools to use resource cache

Committed: https://skia.googlesource.com/skia/+/e935f1a0e2351373c33600b8388492ce1218014a

Review URL: https://codereview.chromium.org/1139753002
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 10e100f..9ad20e5 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -185,6 +185,7 @@
     // recycled in the texture cache. This is to prevent ghosting by drivers
     // (in particular for deferred architectures).
     bool reuseScratchTextures() const { return fReuseScratchTextures; }
+    bool reuseScratchBuffers() const { return fReuseScratchBuffers; }
 
     int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
     int maxTextureSize() const { return fMaxTextureSize; }
@@ -229,10 +230,12 @@
     bool fStencilWrapOpsSupport                      : 1;
     bool fDiscardRenderTargetSupport                 : 1;
     bool fReuseScratchTextures                       : 1;
+    bool fReuseScratchBuffers                        : 1;
     bool fGpuTracingSupport                          : 1;
     bool fCompressedTexSubImageSupport               : 1;
     bool fOversizedStencilSupport                    : 1;
     bool fTextureBarrierSupport                      : 1;
+
     // Driver workaround
     bool fUseDrawInsteadOfClear                      : 1;
     bool fUseDrawInsteadOfPartialRenderTargetWrite   : 1;