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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « media/filters/file_data_source.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 31931c550a5c99ba29d4cb089c667135b4b00a7f..8b9f0299052fa059181aa4c4271e2f53d3e885b9 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -5,6 +5,7 @@
#include "media/filters/gpu_video_decoder.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -39,8 +40,7 @@ static const size_t kSharedMemorySegmentBytes = 100 << 10;
GpuVideoDecoder::SHMBuffer::SHMBuffer(scoped_ptr<base::SharedMemory> m,
size_t s)
- : shm(m.Pass()), size(s) {
-}
+ : shm(std::move(m)), size(s) {}
GpuVideoDecoder::SHMBuffer::~SHMBuffer() {}
@@ -184,7 +184,7 @@ void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
return;
}
- vda_ = factories_->CreateVideoDecodeAccelerator().Pass();
+ vda_ = factories_->CreateVideoDecodeAccelerator();
VideoDecodeAccelerator::Config vda_config(config);
@@ -566,11 +566,11 @@ scoped_ptr<GpuVideoDecoder::SHMBuffer> GpuVideoDecoder::GetSHM(
// CreateSharedMemory() can return NULL during Shutdown.
if (!shm)
return NULL;
- return make_scoped_ptr(new SHMBuffer(shm.Pass(), size_to_allocate));
+ return make_scoped_ptr(new SHMBuffer(std::move(shm), size_to_allocate));
}
scoped_ptr<SHMBuffer> ret(available_shm_segments_.back());
available_shm_segments_.pop_back();
- return ret.Pass();
+ return ret;
}
void GpuVideoDecoder::PutSHM(scoped_ptr<SHMBuffer> shm_buffer) {
« no previous file with comments | « media/filters/file_data_source.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698