Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: gpu/command_buffer/common/buffer.cc

Issue 2909003002: Add gpu::BufferBacking::shared_memory_handle() (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/common/buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/buffer.cc
diff --git a/gpu/command_buffer/common/buffer.cc b/gpu/command_buffer/common/buffer.cc
index 13b606c3286734c4ad04723fd5248239b27143f1..c8d6bbc6045206095202bc2172ced5b38e2de9c9 100644
--- a/gpu/command_buffer/common/buffer.cc
+++ b/gpu/command_buffer/common/buffer.cc
@@ -18,6 +18,10 @@ bool BufferBacking::is_shared() const {
return false;
}
+base::SharedMemoryHandle BufferBacking::shared_memory_handle() const {
+ return base::SharedMemoryHandle();
+}
+
SharedMemoryBufferBacking::SharedMemoryBufferBacking(
std::unique_ptr<base::SharedMemory> shared_memory,
size_t size)
@@ -29,6 +33,11 @@ bool SharedMemoryBufferBacking::is_shared() const {
return true;
}
+base::SharedMemoryHandle SharedMemoryBufferBacking::shared_memory_handle()
+ const {
+ return shared_memory_->handle();
+}
+
void* SharedMemoryBufferBacking::GetMemory() const {
return shared_memory_->memory();
}
« no previous file with comments | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/common/buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698