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

Unified Diff: ui/compositor/layer.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (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 | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 8f8672803103a14aae82d4e153bd7696ae4f8f72..f29f9aa651e69571b15301dfdaf2a7f67623ac88 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -5,6 +5,7 @@
#include "ui/compositor/layer.h"
#include <algorithm>
+#include <utility>
#include "base/auto_reset.h"
#include "base/command_line.h"
@@ -363,7 +364,7 @@ void Layer::SetBackgroundZoom(float zoom, int inset) {
}
void Layer::SetAlphaShape(scoped_ptr<SkRegion> region) {
- alpha_shape_ = region.Pass();
+ alpha_shape_ = std::move(region);
SetLayerFilters();
}
@@ -552,7 +553,7 @@ void Layer::SetTextureMailbox(
}
if (mailbox_release_callback_)
mailbox_release_callback_->Run(gpu::SyncToken(), false);
- mailbox_release_callback_ = release_callback.Pass();
+ mailbox_release_callback_ = std::move(release_callback);
mailbox_ = mailbox;
SetTextureSize(texture_size_in_dip);
}
@@ -745,7 +746,7 @@ void Layer::OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) {
}
void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) {
- cc_layer_->RequestCopyOfOutput(request.Pass());
+ cc_layer_->RequestCopyOfOutput(std::move(request));
}
gfx::Rect Layer::PaintableRegion() {
@@ -786,7 +787,7 @@ bool Layer::PrepareTextureMailbox(
if (!mailbox_release_callback_)
return false;
*mailbox = mailbox_;
- *release_callback = mailbox_release_callback_.Pass();
+ *release_callback = std::move(mailbox_release_callback_);
return true;
}
@@ -973,9 +974,9 @@ void Layer::AddThreadedAnimation(scoped_ptr<cc::Animation> animation) {
// Until this layer has a compositor (and hence cc_layer_ has a
// LayerTreeHost), addAnimation will fail.
if (GetCompositor())
- cc_layer_->AddAnimation(animation.Pass());
+ cc_layer_->AddAnimation(std::move(animation));
else
- pending_threaded_animations_.push_back(animation.Pass());
+ pending_threaded_animations_.push_back(std::move(animation));
}
void Layer::RemoveThreadedAnimation(int animation_id) {
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698