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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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/common/trace_provider_impl.cc ('k') | mojo/gpu/gl_context.h » ('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 bda36a6bf3f3d7e46501455d3914f59a46860d5d..769d81a2bfc618dcbc403933e3563824b0ece62b 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -5,6 +5,7 @@
#include "mojo/gles2/command_buffer_client_impl.h"
#include <limits>
+#include <utility>
#include "base/logging.h"
#include "base/process/process_handle.h"
@@ -47,7 +48,7 @@ void CommandBufferDelegate::ContextLost() {}
class CommandBufferClientImpl::SyncClientImpl
: public mojo::CommandBufferSyncClient {
public:
- SyncClientImpl(mojo::CommandBufferSyncClientPtr* ptr,
+ SyncClientImpl(mojo::InterfaceHandle<mojo::CommandBufferSyncClient>* ptr,
const MojoAsyncWaiter* async_waiter)
: initialized_successfully_(false), binding_(this, ptr, async_waiter) {}
@@ -89,8 +90,9 @@ class CommandBufferClientImpl::SyncClientImpl
class CommandBufferClientImpl::SyncPointClientImpl
: public mojo::CommandBufferSyncPointClient {
public:
- SyncPointClientImpl(mojo::CommandBufferSyncPointClientPtr* ptr,
- const MojoAsyncWaiter* async_waiter)
+ SyncPointClientImpl(
+ mojo::InterfaceHandle<mojo::CommandBufferSyncPointClient>* ptr,
+ const MojoAsyncWaiter* async_waiter)
: sync_point_(0u), binding_(this, ptr, async_waiter) {}
uint32_t WaitForInsertSyncPoint() {
@@ -143,19 +145,18 @@ bool CommandBufferClientImpl::Initialize() {
shared_state()->Initialize();
- mojo::CommandBufferSyncClientPtr sync_client;
+ mojo::InterfaceHandle<mojo::CommandBufferSyncClient> sync_client;
sync_client_impl_.reset(new SyncClientImpl(&sync_client, async_waiter_));
- mojo::CommandBufferSyncPointClientPtr sync_point_client;
+ mojo::InterfaceHandle<mojo::CommandBufferSyncPointClient> sync_point_client;
sync_point_client_impl_.reset(
new SyncPointClientImpl(&sync_point_client, async_waiter_));
- mojo::CommandBufferLostContextObserverPtr observer_ptr;
+ mojo::InterfaceHandle<mojo::CommandBufferLostContextObserver> observer_ptr;
observer_binding_.Bind(GetProxy(&observer_ptr), async_waiter_);
- command_buffer_->Initialize(sync_client.Pass(),
- sync_point_client.Pass(),
- observer_ptr.Pass(),
- duped.Pass());
+ command_buffer_->Initialize(std::move(sync_client),
+ std::move(sync_point_client),
+ std::move(observer_ptr), duped.Pass());
// Wait for DidInitialize to come on the sync client pipe.
if (!sync_client_impl_->WaitForInitialization()) {
« no previous file with comments | « mojo/common/trace_provider_impl.cc ('k') | mojo/gpu/gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698