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

Unified Diff: cc/output/texture_mailbox_deleter.cc

Issue 1803863003: cc: Remove some unnecessary const scoped_refptr&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « cc/output/texture_mailbox_deleter.h ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/texture_mailbox_deleter.cc
diff --git a/cc/output/texture_mailbox_deleter.cc b/cc/output/texture_mailbox_deleter.cc
index 2bef8eb2590a679b638dc02395a5a8d87197f0d1..1310fe7b44e8225823639d4d198ea08c388f6dad 100644
--- a/cc/output/texture_mailbox_deleter.cc
+++ b/cc/output/texture_mailbox_deleter.cc
@@ -40,8 +40,8 @@ static void PostTaskFromMainToImplThread(
}
TextureMailboxDeleter::TextureMailboxDeleter(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
- : impl_task_runner_(task_runner), weak_ptr_factory_(this) {}
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner)
+ : impl_task_runner_(std::move(task_runner)), weak_ptr_factory_(this) {}
TextureMailboxDeleter::~TextureMailboxDeleter() {
for (size_t i = 0; i < impl_callbacks_.size(); ++i)
@@ -49,15 +49,14 @@ TextureMailboxDeleter::~TextureMailboxDeleter() {
}
scoped_ptr<SingleReleaseCallback> TextureMailboxDeleter::GetReleaseCallback(
- const scoped_refptr<ContextProvider>& context_provider,
+ scoped_refptr<ContextProvider> context_provider,
unsigned texture_id) {
- // This callback owns a reference on the |context_provider|. It must be
- // destroyed on the impl thread. Upon destruction of this class, the
- // callback must immediately be destroyed.
+ // This callback owns the |context_provider|. It must be destroyed on the impl
+ // thread. Upon destruction of this class, the callback must immediately be
+ // destroyed.
scoped_ptr<SingleReleaseCallback> impl_callback =
- SingleReleaseCallback::Create(base::Bind(&DeleteTextureOnImplThread,
- context_provider,
- texture_id));
+ SingleReleaseCallback::Create(base::Bind(
+ &DeleteTextureOnImplThread, std::move(context_provider), texture_id));
impl_callbacks_.push_back(std::move(impl_callback));
« no previous file with comments | « cc/output/texture_mailbox_deleter.h ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698