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

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

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
Index: gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h
diff --git a/gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h b/gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h
index 3271c1a6f74119f17462c2e71870c911f3da7631..0ad9e3fa80c1b99793f8a4b672638d192c5e27f2 100644
--- a/gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h
+++ b/gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h
@@ -7,6 +7,8 @@
#include <stddef.h>
+#include <memory>
+
#include "base/macros.h"
#include "gpu/gpu_export.h"
#include "gpu/ipc/client/gpu_memory_buffer_impl.h"
@@ -18,7 +20,7 @@ class GPU_EXPORT GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl {
public:
~GpuMemoryBufferImplSharedMemory() override;
- static scoped_ptr<GpuMemoryBufferImplSharedMemory> Create(
+ static std::unique_ptr<GpuMemoryBufferImplSharedMemory> Create(
gfx::GpuMemoryBufferId id,
const gfx::Size& size,
gfx::BufferFormat format,
@@ -30,7 +32,7 @@ class GPU_EXPORT GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl {
gfx::BufferFormat format,
base::ProcessHandle child_process);
- static scoped_ptr<GpuMemoryBufferImplSharedMemory> CreateFromHandle(
+ static std::unique_ptr<GpuMemoryBufferImplSharedMemory> CreateFromHandle(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
gfx::BufferFormat format,
@@ -56,15 +58,16 @@ class GPU_EXPORT GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl {
gfx::GpuMemoryBufferHandle GetHandle() const override;
private:
- GpuMemoryBufferImplSharedMemory(gfx::GpuMemoryBufferId id,
- const gfx::Size& size,
- gfx::BufferFormat format,
- const DestructionCallback& callback,
- scoped_ptr<base::SharedMemory> shared_memory,
- size_t offset,
- int stride);
-
- scoped_ptr<base::SharedMemory> shared_memory_;
+ GpuMemoryBufferImplSharedMemory(
+ gfx::GpuMemoryBufferId id,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ const DestructionCallback& callback,
+ std::unique_ptr<base::SharedMemory> shared_memory,
+ size_t offset,
+ int stride);
+
+ std::unique_ptr<base::SharedMemory> shared_memory_;
size_t offset_;
int stride_;
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698