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

Unified Diff: cc/layers/texture_layer.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month 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/layers/surface_layer.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 5ddc8b66551da9486f304d7bb6497cf2bbd707c6..952078d5e25ca3afb4534a65c718e473e58540f1 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -128,7 +128,7 @@ void TextureLayer::SetTextureMailboxInternal(
// If we never commited the mailbox, we need to release it here.
if (mailbox.IsValid()) {
holder_ref_ =
- TextureMailboxHolder::Create(mailbox, release_callback.Pass());
+ TextureMailboxHolder::Create(mailbox, std::move(release_callback));
} else {
holder_ref_ = nullptr;
}
@@ -150,8 +150,8 @@ void TextureLayer::SetTextureMailbox(
scoped_ptr<SingleReleaseCallback> release_callback) {
bool requires_commit = true;
bool allow_mailbox_reuse = false;
- SetTextureMailboxInternal(
- mailbox, release_callback.Pass(), requires_commit, allow_mailbox_reuse);
+ SetTextureMailboxInternal(mailbox, std::move(release_callback),
+ requires_commit, allow_mailbox_reuse);
}
static void IgnoreReleaseCallback(const gpu::SyncToken& sync_token, bool lost) {
@@ -170,8 +170,8 @@ void TextureLayer::SetTextureMailboxWithoutReleaseCallback(
bool allow_mailbox_reuse = true;
if (mailbox.IsValid())
release = SingleReleaseCallback::Create(base::Bind(&IgnoreReleaseCallback));
- SetTextureMailboxInternal(
- mailbox, release.Pass(), requires_commit, allow_mailbox_reuse);
+ SetTextureMailboxInternal(mailbox, std::move(release), requires_commit,
+ allow_mailbox_reuse);
}
void TextureLayer::SetNeedsDisplayRect(const gfx::Rect& dirty_rect) {
@@ -212,10 +212,8 @@ bool TextureLayer::Update() {
// Already within a commit, no need to do another one immediately.
bool requires_commit = false;
bool allow_mailbox_reuse = false;
- SetTextureMailboxInternal(mailbox,
- release_callback.Pass(),
- requires_commit,
- allow_mailbox_reuse);
+ SetTextureMailboxInternal(mailbox, std::move(release_callback),
+ requires_commit, allow_mailbox_reuse);
updated = true;
}
}
@@ -246,7 +244,7 @@ void TextureLayer::PushPropertiesTo(LayerImpl* layer) {
release_callback_impl = holder->GetCallbackForImplThread();
}
texture_layer->SetTextureMailbox(texture_mailbox,
- release_callback_impl.Pass());
+ std::move(release_callback_impl));
needs_set_mailbox_ = false;
}
}
@@ -267,7 +265,7 @@ TextureLayer::TextureMailboxHolder::TextureMailboxHolder(
scoped_ptr<SingleReleaseCallback> release_callback)
: internal_references_(0),
mailbox_(mailbox),
- release_callback_(release_callback.Pass()),
+ release_callback_(std::move(release_callback)),
sync_token_(mailbox.sync_token()),
is_lost_(false) {}
@@ -280,7 +278,7 @@ TextureLayer::TextureMailboxHolder::Create(
const TextureMailbox& mailbox,
scoped_ptr<SingleReleaseCallback> release_callback) {
return make_scoped_ptr(new MainThreadReference(
- new TextureMailboxHolder(mailbox, release_callback.Pass())));
+ new TextureMailboxHolder(mailbox, std::move(release_callback))));
}
void TextureLayer::TextureMailboxHolder::Return(
« no previous file with comments | « cc/layers/surface_layer.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698