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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more 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 d5aebd5128f4743de11ba401fa7b882c4fc70165..b274533088bbd76829f569aecf82416b449a2809 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/process/process_handle.h"
-#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/bindings/sync_dispatcher.h"
#include "mojo/services/gles2/command_buffer_type_conversions.h"
#include "mojo/services/gles2/mojo_buffer_backing.h"
@@ -85,7 +84,6 @@ bool CommandBufferClientImpl::Initialize() {
CommandBufferSyncClientPtr sync_client =
MakeProxy<CommandBufferSyncClient>(sync_pipe.handle1.Pass(),
async_waiter_);
- AllocationScope scope;
command_buffer_->Initialize(sync_client.Pass(), duped.Pass());
// Wait for DidInitialize to come on the sync client pipe.
if (!sync_dispatcher_->WaitAndDispatchOneMessage()) {
@@ -149,7 +147,6 @@ scoped_refptr<gpu::Buffer> CommandBufferClientImpl::CreateTransferBuffer(
*id = ++next_transfer_buffer_id_;
- AllocationScope scope;
command_buffer_->RegisterTransferBuffer(
*id, duped.Pass(), static_cast<uint32_t>(size));
@@ -236,9 +233,9 @@ void CommandBufferClientImpl::DidInitialize(bool success) {
initialize_result_ = success;
}
-void CommandBufferClientImpl::DidMakeProgress(const CommandBufferState& state) {
- if (state.generation() - last_state_.generation < 0x80000000U)
- last_state_ = state;
+void CommandBufferClientImpl::DidMakeProgress(CommandBufferStatePtr state) {
+ if (state->generation - last_state_.generation < 0x80000000U)
+ last_state_ = state.To<State>();
}
void CommandBufferClientImpl::DidDestroy() {

Powered by Google App Engine
This is Rietveld 408576698