Chromium Code Reviews

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo part of clang-format Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: gpu/ipc/client/gpu_channel_host.h
diff --git a/gpu/ipc/client/gpu_channel_host.h b/gpu/ipc/client/gpu_channel_host.h
index be04133199c625ca10e9f3d691070f547252672a..94407d144e7f8bcdde358ac5e73c16c8dda75283 100644
--- a/gpu/ipc/client/gpu_channel_host.h
+++ b/gpu/ipc/client/gpu_channel_host.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <string>
#include <vector>
@@ -15,7 +16,6 @@
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/process/process.h"
#include "base/synchronization/lock.h"
@@ -57,7 +57,8 @@ class GPU_EXPORT GpuChannelHostFactory {
virtual bool IsMainThread() = 0;
virtual scoped_refptr<base::SingleThreadTaskRunner>
GetIOThreadTaskRunner() = 0;
- virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
+ virtual std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
+ size_t size) = 0;
};
// Encapsulates an IPC channel between the client and one GPU process.
@@ -108,7 +109,7 @@ class GPU_EXPORT GpuChannelHost
void FlushPendingStream(int32_t stream_id);
// Create and connect to a command buffer in the GPU process.
- scoped_ptr<CommandBufferProxyImpl> CreateCommandBuffer(
+ std::unique_ptr<CommandBufferProxyImpl> CreateCommandBuffer(
gpu::SurfaceHandle surface_handle,
const gfx::Size& size,
CommandBufferProxyImpl* share_group,
@@ -289,7 +290,7 @@ class GPU_EXPORT GpuChannelHost
// Protects channel_ and stream_flush_info_.
mutable base::Lock context_lock_;
- scoped_ptr<IPC::SyncChannel> channel_;
+ std::unique_ptr<IPC::SyncChannel> channel_;
base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_;
DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);

Powered by Google App Engine