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

Unified Diff: media/video/gpu_memory_buffer_video_frame_pool.cc

Issue 1915443003: Replace scoped_ptr with std::unique_ptr in //media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptr-media-base
Patch Set: scopedptr-media: rebase 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: media/video/gpu_memory_buffer_video_frame_pool.cc
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc
index 777a1fc279892fa6afdf8db4071094bdc4469f80..93c0c3a2cae74eb36d1cae3552971d83746fb8f8 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -11,6 +11,7 @@
#include <algorithm>
#include <list>
+#include <memory>
#include <utility>
#include "base/barrier_closure.h"
@@ -75,7 +76,7 @@ class GpuMemoryBufferVideoFramePool::PoolImpl
// Resource to represent a plane.
struct PlaneResource {
gfx::Size size;
- scoped_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
+ std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer;
unsigned texture_id = 0u;
unsigned image_id = 0u;
gpu::Mailbox mailbox;
@@ -540,7 +541,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::
const scoped_refptr<VideoFrame>& video_frame,
FrameResources* frame_resources,
const FrameReadyCB& frame_ready_cb) {
- scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
+ std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
gpu_factories_->GetGLContextLock());
if (!lock) {
frame_ready_cb.Run(video_frame);
@@ -677,7 +678,7 @@ GpuMemoryBufferVideoFramePool::PoolImpl::GetOrCreateFrameResources(
}
// Create the resources.
- scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
+ std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
gpu_factories_->GetGLContextLock());
if (!lock)
return nullptr;
@@ -719,7 +720,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::DeleteFrameResources(
// make sure that we won't execute this callback (use a weak pointer to
// the old context).
- scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
+ std::unique_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> lock(
gpu_factories->GetGLContextLock());
if (!lock)
return;
« no previous file with comments | « media/test/pipeline_integration_test_base.cc ('k') | media/video/gpu_memory_buffer_video_frame_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698