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

Unified Diff: content/common/gpu/media/gpu_jpeg_decode_accelerator.cc

Issue 1544293002: Convert Pass()→std::move() in //content (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
Index: content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
index bb6d6520313fc100e662e990e93e17d34812f5a6..1082b5c9c1a5cb25258309deafa38b22b575ad48 100644
--- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
@@ -5,6 +5,7 @@
#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "base/containers/hash_tables.h"
@@ -112,7 +113,7 @@ class GpuJpegDecodeAccelerator::Client
void set_accelerator(scoped_ptr<media::JpegDecodeAccelerator> accelerator) {
DCHECK(CalledOnValidThread());
- accelerator_ = accelerator.Pass();
+ accelerator_ = std::move(accelerator);
}
private:
@@ -343,7 +344,7 @@ void GpuJpegDecodeAccelerator::AddClient(int32_t route_id,
scoped_ptr<media::JpegDecodeAccelerator> tmp_accelerator =
(*create_jda_function)(io_task_runner_);
if (tmp_accelerator && tmp_accelerator->Initialize(client.get())) {
- accelerator = tmp_accelerator.Pass();
+ accelerator = std::move(tmp_accelerator);
break;
}
}
@@ -354,7 +355,7 @@ void GpuJpegDecodeAccelerator::AddClient(int32_t route_id,
Send(reply_msg);
return;
}
- client->set_accelerator(accelerator.Pass());
+ client->set_accelerator(std::move(accelerator));
if (!filter_) {
DCHECK_EQ(client_number_, 0);
@@ -409,7 +410,7 @@ GpuJpegDecodeAccelerator::CreateV4L2JDA(
if (device)
decoder.reset(new V4L2JpegDecodeAccelerator(device, io_task_runner));
#endif
- return decoder.Pass();
+ return decoder;
}
// static
@@ -420,7 +421,7 @@ GpuJpegDecodeAccelerator::CreateVaapiJDA(
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
decoder.reset(new VaapiJpegDecodeAccelerator(io_task_runner));
#endif
- return decoder.Pass();
+ return decoder;
}
// static
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/media/gpu_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698