aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBufferAllocPool.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-07-31 13:59:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-31 13:59:31 -0700
commiteae6200acbec2255ac00ab363ffbe16758ec9076 (patch)
treea37be1fb02820c40d0ad99366b557997d6b78831 /src/gpu/GrBufferAllocPool.cpp
parent77d89f7dd243a17452d3a5f16a98622993e6bdd9 (diff)
Some cleanup in GrTextureProvider and GrResourceProvider.
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r--src/gpu/GrBufferAllocPool.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index e9172108f3..78bb7ad66a 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);
}
}