Index: gpu/command_buffer/service/transfer_buffer_manager.cc |
diff --git a/gpu/command_buffer/service/transfer_buffer_manager.cc b/gpu/command_buffer/service/transfer_buffer_manager.cc |
index 7f81115b85b5c653c936fef28156e86bd06d54b5..4404a9eb6c48cd781bfc233922a06f79c25073a4 100644 |
--- a/gpu/command_buffer/service/transfer_buffer_manager.cc |
+++ b/gpu/command_buffer/service/transfer_buffer_manager.cc |
@@ -40,8 +40,7 @@ bool TransferBufferManager::Initialize() { |
bool TransferBufferManager::RegisterTransferBuffer( |
int32 id, |
- scoped_ptr<base::SharedMemory> shared_memory, |
- size_t size) { |
+ scoped_ptr<BufferBacking> buffer_backing) { |
if (id <= 0) { |
DVLOG(0) << "Cannot register transfer buffer with non-positive ID."; |
return false; |
@@ -54,13 +53,13 @@ bool TransferBufferManager::RegisterTransferBuffer( |
} |
// Register the shared memory with the ID. |
- scoped_refptr<Buffer> buffer = new gpu::Buffer(shared_memory.Pass(), size); |
+ scoped_refptr<Buffer> buffer(new gpu::Buffer(buffer_backing.Pass())); |
// Check buffer alignment is sane. |
DCHECK(!(reinterpret_cast<uintptr_t>(buffer->memory()) & |
(kCommandBufferEntrySize - 1))); |
- shared_memory_bytes_allocated_ += size; |
+ shared_memory_bytes_allocated_ += buffer->size(); |
TRACE_COUNTER_ID1( |
"gpu", "GpuTransferBufferMemory", this, shared_memory_bytes_allocated_); |