Track GL buffer state based on unique resource ID

Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.

This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004

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

Review URL: https://codereview.chromium.org/1854283004
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index fe0b5de..d8e595a 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -102,7 +102,17 @@
         kNoPendingIO_Flag = kNoPendingIO_ScratchTextureFlag,
     };
 
-    GrBuffer* createBuffer(GrBufferType, size_t size, GrAccessPattern, uint32_t flags);
+    /**
+     * Returns a buffer.
+     *
+     * @param size            minimum size of buffer to return.
+     * @param intendedType    hint to the graphics subsystem about what the buffer will be used for.
+     * @param GrAccessPattern hint to the graphics subsystem about how the data will be accessed.
+     * @param flags           see Flags enum.
+     *
+     * @return the buffer if successful, otherwise nullptr.
+     */
+    GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPattern, uint32_t flags);
 
     GrTexture* createApproxTexture(const GrSurfaceDesc& desc, uint32_t flags) {
         SkASSERT(0 == flags || kNoPendingIO_Flag == flags);