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

Unified Diff: mojo/gles2/command_buffer_client_impl.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 | « mojo/edk/system/platform_wrapper_unittest.cc ('k') | mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/command_buffer_client_impl.cc
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index 1d78f850f5f0c8d7139ddaee712f99dac4be037c..109d9d1d58c2225f2846ddbc6c93883ed055fabe 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -20,7 +20,7 @@
#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
#include "gpu/command_buffer/common/sync_token.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
+#include "mojo/public/cpp/system/platform_handle.h"
namespace gles2 {
@@ -237,15 +237,7 @@ int32_t CommandBufferClientImpl::CreateImage(ClientBuffer buffer,
int platform_handle = dupd_handle.fd;
#endif
- MojoHandle mojo_handle = MOJO_HANDLE_INVALID;
- MojoResult create_result = MojoCreatePlatformHandleWrapper(
- platform_handle, &mojo_handle);
- if (create_result != MOJO_RESULT_OK) {
- NOTIMPLEMENTED();
- return -1;
- }
- mojo::ScopedHandle scoped_handle;
- scoped_handle.reset(mojo::Handle(mojo_handle));
+ mojo::ScopedHandle scoped_handle = mojo::WrapPlatformFile(platform_handle);
command_buffer_->CreateImage(
new_id, std::move(scoped_handle), handle.type, std::move(size),
static_cast<int32_t>(gpu_memory_buffer->GetFormat()), internalformat);
« no previous file with comments | « mojo/edk/system/platform_wrapper_unittest.cc ('k') | mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698