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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
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 8beef82fa47cdd24e75951fb4ed58ff43d56e8a5..01ed08e9b035b7d36654f4cfb68b747319128a91 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -50,13 +50,17 @@ void CommandBufferDelegate::DrawAnimationFrame() {}
CommandBufferClientImpl::CommandBufferClientImpl(
CommandBufferDelegate* delegate,
MojoAsyncWaiter* async_waiter,
- ScopedCommandBufferHandle command_buffer_handle)
+ ScopedMessagePipeHandle command_buffer_handle)
: delegate_(delegate),
- command_buffer_(command_buffer_handle.Pass(), this, this, async_waiter),
+ command_buffer_(MakeProxy<mojo::CommandBuffer>(
+ command_buffer_handle.Pass(), async_waiter)),
shared_state_(NULL),
last_put_offset_(-1),
next_transfer_buffer_id_(0),
- initialize_result_(false) {}
+ initialize_result_(false) {
+ command_buffer_.set_error_handler(this);
+ command_buffer_->SetClient(this);
+}
CommandBufferClientImpl::~CommandBufferClientImpl() {}
@@ -73,6 +77,7 @@ bool CommandBufferClientImpl::Initialize() {
shared_state()->Initialize();
+#if 0
InterfacePipe<CommandBufferSyncClient, NoInterface> sync_pipe;
sync_dispatcher_.reset(new SyncDispatcher<CommandBufferSyncClient>(
sync_pipe.handle_to_peer.Pass(), this));
@@ -83,6 +88,7 @@ bool CommandBufferClientImpl::Initialize() {
VLOG(1) << "Channel encountered error while creating command buffer";
return false;
}
+#endif
return initialize_result_;
}
@@ -252,12 +258,14 @@ void CommandBufferClientImpl::TryUpdateState() {
void CommandBufferClientImpl::MakeProgressAndUpdateState() {
command_buffer_->MakeProgress(last_state_.get_offset);
+#if 0
if (!sync_dispatcher_->WaitAndDispatchOneMessage()) {
VLOG(1) << "Channel encountered error while waiting for command buffer";
// TODO(piman): is it ok for this to re-enter?
DidDestroy();
return;
}
+#endif
}
void CommandBufferClientImpl::DrawAnimationFrame() {

Powered by Google App Engine
This is Rietveld 408576698