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

Unified Diff: base/memory/shared_memory.h

Issue 2496783002: gpu: Reuse existing code for shared memory allocation. (Closed)
Patch Set: . 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') | no next file with comments »
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..f68c861647c88c1c5ccc280063cecd8a7cf6c05c 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 dup = DuplicateHandle(handle());
+ // Close();
+ // return dup;
+ SharedMemoryHandle TakeHandle();
Nico 2016/11/14 18:53:51 make this WARN_UNUSED_RESULT
+
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698