(Animation) Reorder animation variables according to size & remove unused 68/129668/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 17 May 2017 11:22:09 +0000 (12:22 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 17 May 2017 12:26:17 +0000 (13:26 +0100)
Change-Id: I84e1ce4388ec0b31d4077a51fe0f8769dc0464bf

dali/internal/event/animation/animation-impl.cpp
dali/internal/event/animation/animation-impl.h

index c27f31b..0d70028 100644 (file)
@@ -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 );
index fa28101..8554ff4 100644 (file)
@@ -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