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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/gles2/command_buffer_client_impl.h" 5 #include "mojo/gles2/command_buffer_client_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 mojo::CommandBufferSyncClientPtr sync_client; 146 mojo::CommandBufferSyncClientPtr sync_client;
147 sync_client_impl_.reset(new SyncClientImpl(&sync_client, async_waiter_)); 147 sync_client_impl_.reset(new SyncClientImpl(&sync_client, async_waiter_));
148 148
149 mojo::CommandBufferSyncPointClientPtr sync_point_client; 149 mojo::CommandBufferSyncPointClientPtr sync_point_client;
150 sync_point_client_impl_.reset( 150 sync_point_client_impl_.reset(
151 new SyncPointClientImpl(&sync_point_client, async_waiter_)); 151 new SyncPointClientImpl(&sync_point_client, async_waiter_));
152 152
153 mojo::CommandBufferLostContextObserverPtr observer_ptr; 153 mojo::CommandBufferLostContextObserverPtr observer_ptr;
154 observer_binding_.Bind(GetProxy(&observer_ptr), async_waiter_); 154 observer_binding_.Bind(GetProxy(&observer_ptr), async_waiter_);
155 command_buffer_->Initialize(sync_client.Pass(), 155 command_buffer_->Initialize(sync_client.PassInterfaceHandle(),
viettrungluu 2016/02/10 01:04:08 This seems suspicious to me. I wonder if the vario
vardhan 2016/02/11 22:47:53 Done. (I had mojo::Binding<> accept InterfaceHand
156 sync_point_client.Pass(), 156 sync_point_client.PassInterfaceHandle(),
157 observer_ptr.Pass(), 157 observer_ptr.PassInterfaceHandle(), duped.Pass());
viettrungluu 2016/02/10 01:04:08 And what I said about GetProxy applies here to obs
vardhan 2016/02/11 22:47:53 Done.
158 duped.Pass());
159 158
160 // Wait for DidInitialize to come on the sync client pipe. 159 // Wait for DidInitialize to come on the sync client pipe.
161 if (!sync_client_impl_->WaitForInitialization()) { 160 if (!sync_client_impl_->WaitForInitialization()) {
162 VLOG(1) << "Channel encountered error while creating command buffer"; 161 VLOG(1) << "Channel encountered error while creating command buffer";
163 return false; 162 return false;
164 } 163 }
165 capabilities_ = sync_client_impl_->GetCapabilities(); 164 capabilities_ = sync_client_impl_->GetCapabilities();
166 return true; 165 return true;
167 } 166 }
168 167
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 325 }
327 326
328 if (state->generation - last_state_.generation < 0x80000000U) 327 if (state->generation - last_state_.generation < 0x80000000U)
329 last_state_ = state.To<State>(); 328 last_state_ = state.To<State>();
330 } 329 }
331 330
332 void CommandBufferClientImpl::SetLock(base::Lock* lock) { 331 void CommandBufferClientImpl::SetLock(base::Lock* lock) {
333 } 332 }
334 333
335 } // namespace gles2 334 } // namespace gles2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698