Index: gpu/command_buffer/client/transfer_buffer.cc |
diff --git a/gpu/command_buffer/client/transfer_buffer.cc b/gpu/command_buffer/client/transfer_buffer.cc |
index 161c836c3ae87b3c88d754a045cef24f8bb2e8ee..3e03db4b69c0863496e3d6874e981896d2bf308d 100644 |
--- a/gpu/command_buffer/client/transfer_buffer.cc |
+++ b/gpu/command_buffer/client/transfer_buffer.cc |
@@ -96,6 +96,12 @@ unsigned int TransferBuffer::GetFreeSize() const { |
return HaveBuffer() ? ring_buffer_->GetTotalFreeSizeNoWaiting() : 0; |
} |
+base::SharedMemory* TransferBuffer::GetSharedMemory() const { |
+ if (!HaveBuffer()) |
+ return nullptr; |
+ return buffer_->backing()->shared_memory(); |
+} |
+ |
void TransferBuffer::AllocateRingBuffer(unsigned int size) { |
for (;size >= min_buffer_size_; size /= 2) { |
int32_t id = -1; |