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

Unified Diff: mojo/edk/embedder/entrypoints.cc

Issue 1995753002: [mojo-edk] Expose portable API for platform handle wrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 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 | « components/mus/gpu/gpu_type_converters.cc ('k') | mojo/edk/embedder/platform_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/entrypoints.cc
diff --git a/mojo/edk/embedder/entrypoints.cc b/mojo/edk/embedder/entrypoints.cc
index fdd881a59980fe1ae9db97e0515709acde1b11ba..44aa6bf3339b9e314c07793a1adc7565db002bc6 100644
--- a/mojo/edk/embedder/entrypoints.cc
+++ b/mojo/edk/embedder/entrypoints.cc
@@ -10,6 +10,7 @@
#include "mojo/public/c/system/data_pipe.h"
#include "mojo/public/c/system/functions.h"
#include "mojo/public/c/system/message_pipe.h"
+#include "mojo/public/c/system/platform_handle.h"
#include "mojo/public/c/system/wait_set.h"
using mojo::edk::internal::g_core;
@@ -215,4 +216,32 @@ MojoResult MojoUnmapBuffer(void* buffer) {
return g_core->UnmapBuffer(buffer);
}
+MojoResult MojoWrapPlatformHandle(const MojoPlatformHandle* platform_handle,
+ MojoHandle* mojo_handle) {
+ return g_core->WrapPlatformHandle(platform_handle, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformHandle(MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle) {
+ return g_core->UnwrapPlatformHandle(mojo_handle, platform_handle);
+}
+
+MojoResult MojoWrapPlatformSharedBufferHandle(
+ const MojoPlatformHandle* platform_handle,
+ size_t num_bytes,
+ MojoPlatformSharedBufferHandleFlags flags,
+ MojoHandle* mojo_handle) {
+ return g_core->WrapPlatformSharedBufferHandle(platform_handle, num_bytes,
+ flags, mojo_handle);
+}
+
+MojoResult MojoUnwrapPlatformSharedBufferHandle(
+ MojoHandle mojo_handle,
+ MojoPlatformHandle* platform_handle,
+ size_t* num_bytes,
+ MojoPlatformSharedBufferHandleFlags* flags) {
+ return g_core->UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle,
+ num_bytes, flags);
+}
+
} // extern "C"
« no previous file with comments | « components/mus/gpu/gpu_type_converters.cc ('k') | mojo/edk/embedder/platform_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698