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

Unified Diff: cc/CCActiveAnimation.cpp

Issue 11085029: [cc] Use base ptr types for cc's CSS animation classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/CCActiveAnimation.h ('k') | cc/CCActiveAnimationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCActiveAnimation.cpp
diff --git a/cc/CCActiveAnimation.cpp b/cc/CCActiveAnimation.cpp
index e99bd42300dd8c092ba6183d9a216941aaba6017..b1817d18b20dc11cf4979a03d0b642d530f4ef93 100644
--- a/cc/CCActiveAnimation.cpp
+++ b/cc/CCActiveAnimation.cpp
@@ -42,13 +42,13 @@ COMPILE_ASSERT(static_cast<int>(cc::CCActiveAnimation::TargetPropertyEnumSize) =
namespace cc {
-PassOwnPtr<CCActiveAnimation> CCActiveAnimation::create(PassOwnPtr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
+scoped_ptr<CCActiveAnimation> CCActiveAnimation::create(scoped_ptr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
{
- return adoptPtr(new CCActiveAnimation(curve, animationId, groupId, targetProperty));
+ return make_scoped_ptr(new CCActiveAnimation(curve.Pass(), animationId, groupId, targetProperty));
}
-CCActiveAnimation::CCActiveAnimation(PassOwnPtr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
- : m_curve(curve)
+CCActiveAnimation::CCActiveAnimation(scoped_ptr<CCAnimationCurve> curve, int animationId, int groupId, TargetProperty targetProperty)
+ : m_curve(curve.Pass())
, m_id(animationId)
, m_group(groupId)
, m_targetProperty(targetProperty)
@@ -180,14 +180,14 @@ double CCActiveAnimation::trimTimeToCurrentIteration(double monotonicTime) const
return trimmed;
}
-PassOwnPtr<CCActiveAnimation> CCActiveAnimation::clone(InstanceType instanceType) const
+scoped_ptr<CCActiveAnimation> CCActiveAnimation::clone(InstanceType instanceType) const
{
return cloneAndInitialize(instanceType, m_runState, m_startTime);
}
-PassOwnPtr<CCActiveAnimation> CCActiveAnimation::cloneAndInitialize(InstanceType instanceType, RunState initialRunState, double startTime) const
+scoped_ptr<CCActiveAnimation> CCActiveAnimation::cloneAndInitialize(InstanceType instanceType, RunState initialRunState, double startTime) const
{
- OwnPtr<CCActiveAnimation> toReturn(adoptPtr(new CCActiveAnimation(m_curve->clone(), m_id, m_group, m_targetProperty)));
+ scoped_ptr<CCActiveAnimation> toReturn(new CCActiveAnimation(m_curve->clone(), m_id, m_group, m_targetProperty));
toReturn->m_runState = initialRunState;
toReturn->m_iterations = m_iterations;
toReturn->m_startTime = startTime;
@@ -196,7 +196,7 @@ PassOwnPtr<CCActiveAnimation> CCActiveAnimation::cloneAndInitialize(InstanceType
toReturn->m_timeOffset = m_timeOffset;
toReturn->m_alternatesDirection = m_alternatesDirection;
toReturn->m_isControllingInstance = instanceType == ControllingInstance;
- return toReturn.release();
+ return toReturn.Pass();
}
void CCActiveAnimation::pushPropertiesTo(CCActiveAnimation* other) const
« no previous file with comments | « cc/CCActiveAnimation.h ('k') | cc/CCActiveAnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698