diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-02 15:08:18 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-02 15:08:18 +0000 |
commit | f9deb8a15de8061863b38839850207f63a8e47e4 (patch) | |
tree | 289a1643ad96fbc701fffdeec1566f35e4400c57 /src/gpu/GrBufferAllocPool.cpp | |
parent | daf48e02ad2edbc5c96cbee0acecdf97d4684b92 (diff) |
Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData.
BUG=skia:2402
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/243413002
git-svn-id: http://skia.googlecode.com/svn/trunk@14533 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrBufferAllocPool.cpp')
-rw-r--r-- | src/gpu/GrBufferAllocPool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index 2dbf3eb283..30d02d953e 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 && fGpu->caps()->bufferLockSupport()) { + if (!attemptLock && GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags()) { 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 (fGpu->caps()->bufferLockSupport() && + if (GrDrawTargetCaps::kNone_MapFlags != fGpu->caps()->mapBufferFlags() && flushSize > GR_GEOM_BUFFER_LOCK_THRESHOLD) { void* data = buffer->lock(); if (NULL != data) { |