aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBufferAllocPool.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-14 14:44:19 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-14 14:44:19 +0000
commit987dbc08d88fc264b79d953aa58ba9161d1a0bfd (patch)
tree99dfc43bef38603bb122d48f4444904abfcfca7d /src/gpu/GrBufferAllocPool.cpp
parent40d9293b62ca39683a108d853c0218dcd1379042 (diff)
reset cpu shadow of vertex buffer to our usual vb size
Review URL: reset cpu shadow of vertex buffer to our usual vb size git-svn-id: http://skia.googlecode.com/svn/trunk@2871 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r--src/gpu/GrBufferAllocPool.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index b06c3ad94a..d029471a9e 100644
--- a/src/gpu/GrBufferAllocPool.cpp
+++ b/src/gpu/GrBufferAllocPool.cpp
@@ -91,7 +91,9 @@ void GrBufferAllocPool::reset() {
fFirstPreallocBuffer = (fFirstPreallocBuffer + fPreallocBuffersInUse) %
fPreallocBuffers.count();
}
- fCpuData.reset(fGpu->getCaps().fBufferLockSupport ? 0 : fMinBlockSize);
+ // we may have created a large cpu mirror of a large VB. Reset the size
+ // to match our pre-allocated VBs.
+ fCpuData.reset(fMinBlockSize);
GrAssert(0 == fPreallocBuffersInUse);
VALIDATE();
}