aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBufferAllocPool.cpp
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 17:44:34 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 17:44:34 +0000
commit53b614b567c2213dfe3835f14145ab60e265c76e (patch)
tree204f1ba79f4de7c850a3618eb70d183f2407ebcf /src/gpu/GrBufferAllocPool.cpp
parentcce39b264cf5a24f282492ab324dc55b15bf96fd (diff)
Revert of Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData. (https://codereview.chromium.org/243413002/)
Reason for revert: This is firing an assert on many of the Android debug bots Original issue's description: > Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData. > > BUG=skia:2402 > > Committed: http://code.google.com/p/skia/source/detail?r=14533 git-svn-id: http://skia.googlecode.com/svn/trunk@14541 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r--src/gpu/GrBufferAllocPool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index 30d02d953e..2dbf3eb283 100644
--- a/src/gpu/GrBufferAllocPool.cpp
+++ b/src/gpu/GrBufferAllocPool.cpp
@@ -303,7 +303,7 @@ bool GrBufferAllocPool::createBlock(size_t requestSize) {
// threshold (since we don't expect it is likely that we will see more vertex data)
// b) If the hint is not set we lock if the buffer size is greater than the threshold.
bool attemptLock = block.fBuffer->isCPUBacked();
- if (!attemptLock && GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags()) {
+ if (!attemptLock && fGpu->caps()->bufferLockSupport()) {
if (fFrequentResetHint) {
attemptLock = requestSize > GR_GEOM_BUFFER_LOCK_THRESHOLD;
} else {
@@ -351,7 +351,7 @@ void GrBufferAllocPool::flushCpuData(GrGeometryBuffer* buffer,
SkASSERT(flushSize <= buffer->sizeInBytes());
VALIDATE(true);
- if (GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags() &&
+ if (fGpu->caps()->bufferLockSupport() &&
flushSize > GR_GEOM_BUFFER_LOCK_THRESHOLD) {
void* data = buffer->lock();
if (NULL != data) {