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

Unified Diff: components/mus/gles2/command_buffer_driver.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/leveldb/leveldb_mojo_proxy.cc ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_driver.cc
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index 9891859b1d5593de826cb5c3f7b0da0bfb535cc8..a8d178293f147587cca006bec84f08b741f2f327 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -26,7 +26,7 @@
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
+#include "mojo/public/cpp/system/platform_handle.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/vsync_provider.h"
@@ -255,18 +255,18 @@ void CommandBufferDriver::CreateImage(int32_t id,
return;
}
- MojoPlatformHandle platform_handle;
- MojoResult extract_result = MojoExtractPlatformHandle(
- memory_handle.release().value(), &platform_handle);
- if (extract_result != MOJO_RESULT_OK) {
+ base::PlatformFile platform_file;
+ MojoResult unwrap_result = mojo::UnwrapPlatformFile(std::move(memory_handle),
+ &platform_file);
+ if (unwrap_result != MOJO_RESULT_OK) {
NOTREACHED();
return;
}
#if defined(OS_WIN)
- base::SharedMemoryHandle handle(platform_handle, base::GetCurrentProcId());
+ base::SharedMemoryHandle handle(platform_file, base::GetCurrentProcId());
#else
- base::FileDescriptor handle(platform_handle, false);
+ base::FileDescriptor handle(platform_file, false);
#endif
scoped_refptr<gl::GLImageSharedMemory> image =
« no previous file with comments | « components/leveldb/leveldb_mojo_proxy.cc ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698