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

Unified Diff: components/mus/gles2/mojo_gpu_memory_buffer.cc

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « components/mus/gles2/mojo_gpu_memory_buffer.h ('k') | components/mus/gles2/ozone_gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/mojo_gpu_memory_buffer.cc
diff --git a/components/mus/gles2/mojo_gpu_memory_buffer.cc b/components/mus/gles2/mojo_gpu_memory_buffer.cc
index b3cc044b25bf3f01aca5a0cefddce418fd7658bb..48ce8498e1c65f66add5cf4dd078c259dbd25447 100644
--- a/components/mus/gles2/mojo_gpu_memory_buffer.cc
+++ b/components/mus/gles2/mojo_gpu_memory_buffer.cc
@@ -7,6 +7,7 @@
#include <stdint.h>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
#include "base/numerics/safe_conversions.h"
#include "build/build_config.h"
@@ -17,24 +18,24 @@ namespace mus {
MojoGpuMemoryBufferImpl::MojoGpuMemoryBufferImpl(
const gfx::Size& size,
gfx::BufferFormat format,
- scoped_ptr<base::SharedMemory> shared_memory)
+ std::unique_ptr<base::SharedMemory> shared_memory)
: GpuMemoryBufferImpl(gfx::GenericSharedMemoryId(0), size, format),
shared_memory_(std::move(shared_memory)) {}
// TODO(rjkroege): Support running a destructor callback as necessary.
MojoGpuMemoryBufferImpl::~MojoGpuMemoryBufferImpl() {}
-scoped_ptr<gfx::GpuMemoryBuffer> MojoGpuMemoryBufferImpl::Create(
+std::unique_ptr<gfx::GpuMemoryBuffer> MojoGpuMemoryBufferImpl::Create(
const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferUsage usage) {
size_t bytes = gfx::BufferSizeForBufferFormat(size, format);
- scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
+ std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
if (!shared_memory->CreateAnonymous(bytes))
return nullptr;
- return make_scoped_ptr<gfx::GpuMemoryBuffer>(
+ return base::WrapUnique<gfx::GpuMemoryBuffer>(
new MojoGpuMemoryBufferImpl(size, format, std::move(shared_memory)));
}
« no previous file with comments | « components/mus/gles2/mojo_gpu_memory_buffer.h ('k') | components/mus/gles2/ozone_gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698