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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.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/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_animation_timelines.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 4ae38fea33ddbc8177b2af4a0d2c576adf342c05..e7cfa62d593d15ba8764322b09877ca3e4c51bb4 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -414,8 +414,8 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation
// Any valid AnimationCurve will do here.
scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 1, Animation::OPACITY));
- layer->layer_animation_controller()->AddAnimation(animation.Pass());
+ Animation::Create(std::move(curve), 1, 1, Animation::OPACITY));
+ layer->layer_animation_controller()->AddAnimation(std::move(animation));
// We add the animation *before* attaching the layer to the tree.
layer_tree_host()->root_layer()->AddChild(layer);
@@ -650,10 +650,11 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated
ScrollOffsetAnimationCurve::Create(
gfx::ScrollOffset(500.f, 550.f),
EaseInOutTimingFunction::Create()));
- scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 0, Animation::SCROLL_OFFSET));
+ scoped_ptr<Animation> animation(Animation::Create(
+ std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
animation->set_needs_synchronized_start_time(true);
- bool animation_added = scroll_layer_->AddAnimation(animation.Pass());
+ bool animation_added =
+ scroll_layer_->AddAnimation(std::move(animation));
bool impl_scrolling_supported =
layer_tree_host()->proxy()->SupportsImplScrolling();
EXPECT_EQ(impl_scrolling_supported, animation_added);
@@ -701,9 +702,9 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
EaseInOutTimingFunction::Create()));
scoped_ptr<Animation> animation(
- Animation::Create(curve.Pass(), 1, 0, Animation::SCROLL_OFFSET));
+ Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
animation->set_needs_synchronized_start_time(true);
- scroll_layer_->AddAnimation(animation.Pass());
+ scroll_layer_->AddAnimation(std::move(animation));
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_animation_timelines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698