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..18b15c1d93427d3f01063276c3b285c49a05f998 100644 |
--- a/gpu/command_buffer/client/transfer_buffer.cc |
+++ b/gpu/command_buffer/client/transfer_buffer.cc |
@@ -96,6 +96,14 @@ unsigned int TransferBuffer::GetFreeSize() const { |
return HaveBuffer() ? ring_buffer_->GetTotalFreeSizeNoWaiting() : 0; |
} |
+base::SharedMemory* TransferBuffer::GetSharedMemory() const { |
+ if (!HaveBuffer()) |
+ return nullptr; |
+ if (!buffer_->backing()) |
+ return nullptr; |
+ return buffer_->backing()->shared_memory(); |
+} |
+ |
void TransferBuffer::AllocateRingBuffer(unsigned int size) { |
for (;size >= min_buffer_size_; size /= 2) { |
int32_t id = -1; |