Index: content/browser/compositor/buffer_queue.cc |
diff --git a/content/browser/compositor/buffer_queue.cc b/content/browser/compositor/buffer_queue.cc |
index cafb6d96a18b64448d2cf331b86f67a7a15b4a0a..e5c60b9ca25fa0c2007588f58b9ac98734ce8b89 100644 |
--- a/content/browser/compositor/buffer_queue.cc |
+++ b/content/browser/compositor/buffer_queue.cc |
@@ -5,6 +5,7 @@ |
#include "content/browser/compositor/buffer_queue.h" |
#include "base/containers/adapters.h" |
+#include "base/memory/ptr_util.h" |
#include "build/build_config.h" |
#include "content/browser/compositor/gl_helper.h" |
#include "content/browser/compositor/image_transport_factory.h" |
@@ -156,12 +157,12 @@ void BufferQueue::RecreateBuffers() { |
} |
} |
-scoped_ptr<BufferQueue::AllocatedSurface> BufferQueue::RecreateBuffer( |
- scoped_ptr<AllocatedSurface> surface) { |
+std::unique_ptr<BufferQueue::AllocatedSurface> BufferQueue::RecreateBuffer( |
+ std::unique_ptr<AllocatedSurface> surface) { |
if (!surface) |
return nullptr; |
- scoped_ptr<AllocatedSurface> new_surface(GetNextSurface()); |
+ std::unique_ptr<AllocatedSurface> new_surface(GetNextSurface()); |
if (!new_surface) |
return nullptr; |
@@ -204,9 +205,9 @@ void BufferQueue::FreeSurfaceResources(AllocatedSurface* surface) { |
allocated_count_--; |
} |
-scoped_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() { |
+std::unique_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() { |
if (!available_surfaces_.empty()) { |
- scoped_ptr<AllocatedSurface> surface = |
+ std::unique_ptr<AllocatedSurface> surface = |
std::move(available_surfaces_.back()); |
available_surfaces_.pop_back(); |
return surface; |
@@ -221,7 +222,7 @@ scoped_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() { |
// We don't want to allow anything more than triple buffering. |
DCHECK_LT(allocated_count_, 4U); |
- scoped_ptr<gfx::GpuMemoryBuffer> buffer( |
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer( |
gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer( |
size_, gpu::DefaultBufferFormatForImageFormat(internal_format_), |
gfx::BufferUsage::SCANOUT, surface_id_)); |
@@ -243,13 +244,13 @@ scoped_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() { |
allocated_count_++; |
gl->BindTexture(texture_target_, texture); |
gl->BindTexImage2DCHROMIUM(texture_target_, id); |
- return make_scoped_ptr(new AllocatedSurface(this, std::move(buffer), texture, |
- id, gfx::Rect(size_))); |
+ return base::WrapUnique(new AllocatedSurface(this, std::move(buffer), texture, |
+ id, gfx::Rect(size_))); |
} |
BufferQueue::AllocatedSurface::AllocatedSurface( |
BufferQueue* buffer_queue, |
- scoped_ptr<gfx::GpuMemoryBuffer> buffer, |
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer, |
unsigned int texture, |
unsigned int image, |
const gfx::Rect& rect) |