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

Unified Diff: mojo/public/cpp/system/core.h

Issue 221453007: mojo/gpu: use SharedBuffer instead of base::SharedMemory with hacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 6 years, 9 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 | « mojo/mojo_services.gypi ('k') | mojo/services/gles2/command_buffer.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/core.h
diff --git a/mojo/public/cpp/system/core.h b/mojo/public/cpp/system/core.h
index 70221107ab0a2d6ee332d461294840c34c601d55..a5bfb399a7c0c412615f8b439fcf4cf2a4852ff9 100644
--- a/mojo/public/cpp/system/core.h
+++ b/mojo/public/cpp/system/core.h
@@ -404,14 +404,14 @@ inline MojoResult CreateSharedBuffer(
// manually. (The template enforces that the in and out handles to be of the
// same type.)
template <class BufferHandleType>
-inline MojoResult DuplicatedBuffer(
+inline MojoResult DuplicateBuffer(
BufferHandleType buffer,
const MojoDuplicateBufferHandleOptions* options,
ScopedHandleBase<BufferHandleType>* new_buffer) {
assert(new_buffer);
BufferHandleType handle;
- MojoResult rv = MojoDuplicateSharedBuffer(buffer.value(), options,
- handle.mutable_value());
+ MojoResult rv = MojoDuplicateBufferHandle(
+ buffer.value(), options, handle.mutable_value());
// Reset even on failure (reduces the chances that a "stale"/incorrect handle
// will be used).
new_buffer->reset(handle);
@@ -424,7 +424,7 @@ inline MojoResult MapBuffer(BufferHandleType buffer,
uint64_t num_bytes,
void** pointer,
MojoMapBufferFlags flags) {
- assert(buffer);
+ assert(buffer.is_valid());
return MojoMapBuffer(buffer.value(), offset, num_bytes, pointer, flags);
}
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/gles2/command_buffer.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698