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

Unified Diff: cc/test/animation_test_common.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 3 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/surfaces/surface_aggregator.cc ('k') | cc/test/cc_test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/animation_test_common.cc
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index 404e161d880494164da9d9a50426c262939422d6..953dac4df9dccdc336410e864b9b5bb32bf1729e 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -41,11 +41,11 @@ int AddOpacityTransition(Target* target,
int id = AnimationIdProvider::NextAnimationId();
- scoped_ptr<Animation> animation(Animation::Create(
- curve.PassAs<AnimationCurve>(),
- id,
- AnimationIdProvider::NextGroupId(),
- Animation::Opacity));
+ scoped_ptr<Animation> animation(
+ Animation::Create(curve.Pass(),
+ id,
+ AnimationIdProvider::NextGroupId(),
+ Animation::Opacity));
animation->set_needs_synchronized_start_time(true);
target->AddAnimation(animation.Pass());
@@ -70,11 +70,11 @@ int AddAnimatedTransform(Target* target,
int id = AnimationIdProvider::NextAnimationId();
- scoped_ptr<Animation> animation(Animation::Create(
- curve.PassAs<AnimationCurve>(),
- id,
- AnimationIdProvider::NextGroupId(),
- Animation::Transform));
+ scoped_ptr<Animation> animation(
+ Animation::Create(curve.Pass(),
+ id,
+ AnimationIdProvider::NextGroupId(),
+ Animation::Transform));
animation->set_needs_synchronized_start_time(true);
target->AddAnimation(animation.Pass());
@@ -120,10 +120,7 @@ int AddAnimatedFilter(Target* target,
int id = AnimationIdProvider::NextAnimationId();
scoped_ptr<Animation> animation(Animation::Create(
- curve.PassAs<AnimationCurve>(),
- id,
- AnimationIdProvider::NextGroupId(),
- Animation::Filter));
+ curve.Pass(), id, AnimationIdProvider::NextGroupId(), Animation::Filter));
animation->set_needs_synchronized_start_time(true);
target->AddAnimation(animation.Pass());
@@ -147,7 +144,7 @@ float FakeFloatAnimationCurve::GetValue(double now) const {
}
scoped_ptr<AnimationCurve> FakeFloatAnimationCurve::Clone() const {
- return make_scoped_ptr(new FakeFloatAnimationCurve).PassAs<AnimationCurve>();
+ return make_scoped_ptr(new FakeFloatAnimationCurve);
}
FakeTransformTransition::FakeTransformTransition(double duration)
@@ -178,8 +175,7 @@ bool FakeTransformTransition::MaximumScale(float* max_scale) const {
}
scoped_ptr<AnimationCurve> FakeTransformTransition::Clone() const {
- return make_scoped_ptr(new FakeTransformTransition(*this))
- .PassAs<AnimationCurve>();
+ return make_scoped_ptr(new FakeTransformTransition(*this));
}
@@ -242,8 +238,7 @@ gfx::Vector2dF FakeLayerAnimationValueProvider::ScrollOffsetForAnimation()
}
scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const {
- return make_scoped_ptr(new FakeFloatTransition(*this))
- .PassAs<AnimationCurve>();
+ return make_scoped_ptr(new FakeFloatTransition(*this));
}
int AddOpacityTransitionToController(LayerAnimationController* controller,
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/test/cc_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698