From: Adeel Kazmi Date: Wed, 17 May 2017 11:22:09 +0000 (+0100) Subject: (Animation) Reorder animation variables according to size & remove unused X-Git-Tag: dali_1.2.40~5^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=5092dc7e2cc92c641d1771540181370cc60549e0 (Animation) Reorder animation variables according to size & remove unused Change-Id: I84e1ce4388ec0b31d4077a51fe0f8769dc0464bf --- diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index c27f31b..0d70028 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -112,17 +112,18 @@ AnimationPtr Animation::New(float durationSeconds) } Animation::Animation( EventThreadServices& eventThreadServices, AnimationPlaylist& playlist, float durationSeconds, EndAction endAction, EndAction disconnectAction, AlphaFunction defaultAlpha ) -: mEventThreadServices( eventThreadServices ), +: mAnimation( NULL ), + mEventThreadServices( eventThreadServices ), mPlaylist( playlist ), - mAnimation( NULL ), - mNotificationCount( 0 ), - mFinishedCallback( NULL ), - mFinishedCallbackObject( NULL ), + mFinishedSignal(), + mConnectors(), + mConnectorTargetValues(), + mPlayRange( Vector2(0.0f,1.0f)), mDurationSeconds( durationSeconds ), mSpeedFactor(1.0f), + mNotificationCount( 0 ), mLoopCount(1), mCurrentLoop(0), - mPlayRange( Vector2(0.0f,1.0f)), mEndAction( endAction ), mDisconnectAction( disconnectAction ), mDefaultAlpha( defaultAlpha ), @@ -782,12 +783,6 @@ void Animation::EmitSignalFinish() Dali::Animation handle( this ); mFinishedSignal.Emit( handle ); } - - // This callback is used internally, to avoid the overhead of using a signal. - if ( mFinishedCallback ) - { - mFinishedCallback( mFinishedCallbackObject ); - } } bool Animation::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) @@ -808,12 +803,6 @@ bool Animation::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* return connected; } -void Animation::SetFinishedCallback( FinishedCallback callback, Object* object ) -{ - mFinishedCallback = callback; - mFinishedCallbackObject = object; -} - void Animation::AddAnimatorConnector( AnimatorConnectorBase* connector ) { DALI_ASSERT_DEBUG( NULL != connector ); diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index fa28101..8554ff4 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -62,8 +62,6 @@ public: typedef Dali::Animation::EndAction EndAction; typedef Dali::Animation::Interpolation Interpolation; - typedef void (*FinishedCallback)(Object* object); - /** * Create a new Animation object. * @param[in] durationSeconds The duration of the animation. @@ -210,13 +208,6 @@ public: static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes); /** - * This callback is intended for internal use only, to avoid the overhead of using a signal. - * @param[in] callback The callback function to connect. - * @param[in] object The internal object requesting the callback, or NULL. - */ - void SetFinishedCallback( FinishedCallback callback, Object* object ); - - /** * @copydoc Dali::Animation::AnimateBy(Property target, Property::Value relativeValue) */ void AnimateBy(Property& target, Property::Value& relativeValue); @@ -455,33 +446,28 @@ private: Property::Value targetValue; }; - EventThreadServices& mEventThreadServices; - AnimationPlaylist& mPlaylist; - const SceneGraph::Animation* mAnimation; - int mNotificationCount; ///< Keep track of how many Finished signals have been emitted. + EventThreadServices& mEventThreadServices; + AnimationPlaylist& mPlaylist; Dali::Animation::AnimationSignalType mFinishedSignal; - FinishedCallback mFinishedCallback; - Object* mFinishedCallbackObject; - AnimatorConnectorContainer mConnectors; ///< Owned by the Animation std::vector< ConnectorTargetValues > mConnectorTargetValues; //< Used to store animating property target value information - // Cached for public getters + Vector2 mPlayRange; + float mDurationSeconds; float mSpeedFactor; + int mNotificationCount; ///< Keep track of how many Finished signals have been emitted. int mLoopCount; int mCurrentLoop; - Vector2 mPlayRange; EndAction mEndAction; EndAction mDisconnectAction; AlphaFunction mDefaultAlpha; Dali::Animation::State mState; - }; } // namespace Internal