Add optional data parameter to createBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877073002
Review URL: https://codereview.chromium.org/1877073002
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 6b815b6..d062a48 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -236,9 +236,9 @@
}
GrBuffer* GrGpu::createBuffer(size_t size, GrBufferType intendedType,
- GrAccessPattern accessPattern) {
+ GrAccessPattern accessPattern, const void* data) {
this->handleDirtyContext();
- GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern);
+ GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern, data);
if (!this->caps()->reuseScratchBuffers()) {
buffer->resourcePriv().removeScratchKey();
}