Delay creation of cpu-side buffer memory until actually needed
IIUC what is going on, this won't really do anything bad but will defer allocation of the cpu-side buffer until it is actually needed.
BUG=635015
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248283007
Review-Url: https://codereview.chromium.org/2248283007
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index bb73a10..e3f30b0 100644
--- a/src/gpu/GrBufferAllocPool.cpp
+++ b/src/gpu/GrBufferAllocPool.cpp
@@ -78,10 +78,7 @@
VALIDATE();
fBytesInUse = 0;
this->deleteBlocks();
-
- // we may have created a large cpu mirror of a large VB. Reset the size to match our minimum.
- this->resetCpuData(fMinBlockSize);
-
+ this->resetCpuData(0); // delete all the cpu-side memory
VALIDATE();
}