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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/fetcher/update_fetcher.cc ('k') | mojo/gles2/gles2_context.cc » ('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 142bfc96977fcf94fac2f0612352c227c3a86800..2f9277008a52365939bdf7b2ed29f072be67a273 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"
@@ -71,7 +72,7 @@ CommandBufferClientImpl::CommandBufferClientImpl(
flushed_fence_sync_release_(0),
async_waiter_(async_waiter) {
command_buffer_.Bind(mojo::InterfacePtrInfo<mus::mojom::CommandBuffer>(
- command_buffer_handle.Pass(), 0u),
+ std::move(command_buffer_handle), 0u),
async_waiter);
command_buffer_.set_connection_error_handler(
[this]() { DidLoseContext(gpu::error::kUnknown); });
@@ -96,7 +97,8 @@ bool CommandBufferClientImpl::Initialize() {
observer_binding_.Bind(GetProxy(&observer_ptr), async_waiter_);
mus::mojom::CommandBufferInfoPtr info;
command_buffer_->Initialize(
- observer_ptr.Pass(), duped.Pass(), mojo::Array<int32_t>::From(attribs_),
+ std::move(observer_ptr), std::move(duped),
+ mojo::Array<int32_t>::From(attribs_),
base::Bind(&Copy<mus::mojom::CommandBufferInfoPtr>, &info));
base::ThreadRestrictions::ScopedAllowWait wait;
@@ -179,12 +181,12 @@ scoped_refptr<gpu::Buffer> CommandBufferClientImpl::CreateTransferBuffer(
*id = ++next_transfer_buffer_id_;
- command_buffer_->RegisterTransferBuffer(
- *id, duped.Pass(), static_cast<uint32_t>(size));
+ command_buffer_->RegisterTransferBuffer(*id, std::move(duped),
+ static_cast<uint32_t>(size));
scoped_ptr<gpu::BufferBacking> backing(
- new mus::MojoBufferBacking(handle.Pass(), memory, size));
- scoped_refptr<gpu::Buffer> buffer(new gpu::Buffer(backing.Pass()));
+ new mus::MojoBufferBacking(std::move(handle), memory, size));
+ scoped_refptr<gpu::Buffer> buffer(new gpu::Buffer(std::move(backing)));
return buffer;
}
@@ -235,7 +237,7 @@ int32_t CommandBufferClientImpl::CreateImage(ClientBuffer buffer,
mojo::ScopedHandle scoped_handle;
scoped_handle.reset(mojo::Handle(mojo_handle));
command_buffer_->CreateImage(
- new_id, scoped_handle.Pass(), handle.type, size.Pass(),
+ new_id, std::move(scoped_handle), handle.type, std::move(size),
static_cast<int32_t>(gpu_memory_buffer->GetFormat()), internalformat);
if (requires_sync_point) {
NOTIMPLEMENTED();
« no previous file with comments | « mojo/fetcher/update_fetcher.cc ('k') | mojo/gles2/gles2_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698