summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/mapped_memory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/client/mapped_memory.cc')
-rw-r--r--gpu/command_buffer/client/mapped_memory.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc
index 5278fc8..c8d400e 100644
--- a/gpu/command_buffer/client/mapped_memory.cc
+++ b/gpu/command_buffer/client/mapped_memory.cc
@@ -56,10 +56,11 @@ void* MappedMemoryManager::Alloc(
unsigned int chunk_size =
((size + chunk_size_multiple_ - 1) / chunk_size_multiple_) *
chunk_size_multiple_;
- int32 id = -1;
- gpu::Buffer shm = cmd_buf->CreateTransferBuffer(chunk_size, &id);
- if (id < 0)
+ int32 id = cmd_buf->CreateTransferBuffer(chunk_size, -1);
+ if (id == -1) {
return NULL;
+ }
+ gpu::Buffer shm = cmd_buf->GetTransferBuffer(id);
MemoryChunk* mc = new MemoryChunk(id, shm, helper_);
chunks_.push_back(mc);
void* mem = mc->Alloc(size);