Index: src/gpu/GrBufferAllocPool.cpp |
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp |
index e9172108f33707485df1a39454121f5e21ad96f8..78bb7ad66afa75b87b29460a736b9d408c429481 100644 |
--- a/src/gpu/GrBufferAllocPool.cpp |
+++ b/src/gpu/GrBufferAllocPool.cpp |
@@ -302,11 +302,14 @@ GrGeometryBuffer* GrBufferAllocPool::getBuffer(size_t size) { |
GrResourceProvider* rp = fGpu->getContext()->resourceProvider(); |
+ static const GrResourceProvider::BufferUsage kUsage = GrResourceProvider::kDynamic_BufferUsage; |
+ // Shouldn't have to use this flag (http://skbug.com/4156) |
+ static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag; |
if (kIndex_BufferType == fBufferType) { |
- return rp->getIndexBuffer(size, /* dynamic = */ true, /* duringFlush = */ true); |
+ return rp->createIndexBuffer(size, kUsage, kFlags); |
} else { |
SkASSERT(kVertex_BufferType == fBufferType); |
- return rp->getVertexBuffer(size, /* dynamic = */ true, /* duringFlush = */ true); |
+ return rp->createVertexBuffer(size, kUsage, kFlags); |
} |
} |