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

Unified Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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 | « gpu/ipc/client/gpu_channel_host.h ('k') | gpu/ipc/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/client/gpu_channel_host.cc
diff --git a/gpu/ipc/client/gpu_channel_host.cc b/gpu/ipc/client/gpu_channel_host.cc
index 54ad6a936fec7a3c0de2798347df59ce61c0d5b7..68ed8ccb8eba881f0e0573b7ced28aa56065d85a 100644
--- a/gpu/ipc/client/gpu_channel_host.cc
+++ b/gpu/ipc/client/gpu_channel_host.cc
@@ -10,6 +10,7 @@
#include "base/atomic_sequence_num.h"
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/posix/eintr_wrapper.h"
#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
@@ -100,7 +101,7 @@ void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle,
bool GpuChannelHost::Send(IPC::Message* msg) {
// Callee takes ownership of message, regardless of whether Send is
// successful. See IPC::Sender.
- scoped_ptr<IPC::Message> message(msg);
+ std::unique_ptr<IPC::Message> message(msg);
// The GPU process never sends synchronous IPCs so clear the unblock flag to
// preserve order.
message->set_unblock(false);
@@ -188,7 +189,7 @@ void GpuChannelHost::InternalFlush(StreamFlushInfo* flush_info) {
flush_info->flushed_stream_flush_id = flush_info->flush_id;
}
-scoped_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateCommandBuffer(
+std::unique_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateCommandBuffer(
gpu::SurfaceHandle surface_handle,
const gfx::Size& size,
CommandBufferProxyImpl* share_group,
@@ -234,8 +235,8 @@ scoped_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateCommandBuffer(
return nullptr;
}
- scoped_ptr<CommandBufferProxyImpl> command_buffer =
- make_scoped_ptr(new CommandBufferProxyImpl(this, route_id, stream_id));
+ std::unique_ptr<CommandBufferProxyImpl> command_buffer =
+ base::WrapUnique(new CommandBufferProxyImpl(this, route_id, stream_id));
AddRoute(route_id, command_buffer->AsWeakPtr());
return command_buffer;
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.h ('k') | gpu/ipc/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698