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

Unified Diff: base/memory/shared_memory.h

Issue 2496783002: gpu: Reuse existing code for shared memory allocation. (Closed)
Patch Set: nacl Created 4 years, 1 month 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 | « no previous file | base/memory/shared_memory_mac.cc » ('j') | base/memory/shared_memory_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index aa36768721e4203f050be292c979d35604a8578f..98f5396f94b8d0a68dab2914bd2ecc649b42aed0 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -192,6 +192,13 @@ class BASE_EXPORT SharedMemory {
// identifier is not portable.
SharedMemoryHandle handle() const;
+ // Returns the underlying OS handle for this segment. The caller also gets
+ // ownership of the handle. This is logically equivalent to:
+ // SharedMemoryHandle handle = DuplicateHandle(handle());
+ // Close();
+ // return handle;
+ SharedMemoryHandle TakeHandle();
+
// Closes the open shared memory segment. The memory will remain mapped if
// it was previously mapped.
// It is safe to call Close repeatedly.
« no previous file with comments | « no previous file | base/memory/shared_memory_mac.cc » ('j') | base/memory/shared_memory_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698