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

Unified Diff: ui/compositor/layer_animation_element.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/layer.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.cc
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index 1d4a2414e5fd91088eb8bdff9f9f7b34a9c0f478..0e2a976221efc78f50652f3e1ea1b8b6c117889c 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -4,6 +4,8 @@
#include "ui/compositor/layer_animation_element.h"
+#include <utility>
+
#include "base/compiler_specific.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_id_provider.h"
@@ -363,7 +365,7 @@ class ThreadedLayerAnimationElement : public LayerAnimationElement {
set_effective_start_time(base::TimeTicks());
scoped_ptr<cc::Animation> animation = CreateCCAnimation();
animation->set_needs_synchronized_start_time(true);
- delegate->AddThreadedAnimation(animation.Pass());
+ delegate->AddThreadedAnimation(std::move(animation));
}
virtual void OnEnd(LayerAnimationDelegate* delegate) = 0;
@@ -411,9 +413,9 @@ class ThreadedOpacityTransition : public ThreadedLayerAnimationElement {
target_,
duration()));
scoped_ptr<cc::Animation> animation(
- cc::Animation::Create(animation_curve.Pass(), animation_id(),
+ cc::Animation::Create(std::move(animation_curve), animation_id(),
animation_group_id(), cc::Animation::OPACITY));
- return animation.Pass();
+ return animation;
}
void OnGetTarget(TargetValue* target) const override {
@@ -464,9 +466,9 @@ class ThreadedTransformTransition : public ThreadedLayerAnimationElement {
target_,
duration()));
scoped_ptr<cc::Animation> animation(
- cc::Animation::Create(animation_curve.Pass(), animation_id(),
+ cc::Animation::Create(std::move(animation_curve), animation_id(),
animation_group_id(), cc::Animation::TRANSFORM));
- return animation.Pass();
+ return animation;
}
void OnGetTarget(TargetValue* target) const override {
@@ -538,7 +540,7 @@ class InverseTransformTransition : public ThreadedLayerAnimationElement {
scoped_ptr<cc::Animation> animation(
cc::Animation::Create(animation_curve_->Clone(), animation_id(),
animation_group_id(), cc::Animation::TRANSFORM));
- return animation.Pass();
+ return animation;
}
void OnGetTarget(TargetValue* target) const override {
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698