Extend Animation duration when an animator exceeds current duration. 75/26375/5
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 21 Aug 2014 09:41:16 +0000 (10:41 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Thu, 21 Aug 2014 10:33:15 +0000 (11:33 +0100)
[Problem]  Everyone's pet hate with animation.
[Cause]    Duration does not extend when animators are added.
[Solution] Extend Animation duration.

Change-Id: I72f242794601be9e8f1c3a38acd2607fb86115cc

automated-tests/src/dali/utc-Dali-Animation.cpp
dali/internal/event/animation/animation-impl.cpp
dali/internal/event/animation/animation-impl.h

index 8d77d41..5287188 100644 (file)
@@ -9660,3 +9660,65 @@ int UtcDaliAnimationSignalOrder(void)
 
   END_TEST;
 }
+
+int UtcDaliAnimationExtendDuration(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  // Register a float property
+  float startValue(10.0f);
+  Property::Index index = actor.RegisterProperty( "test-property", startValue );
+  Stage::GetCurrent().Add(actor);
+  DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
+
+  // Build the animation
+  float initialDurationSeconds(1.0f);
+  float animatorDelay = 5.0f;
+  float animatorDurationSeconds(5.0f);
+  float extendedDurationSeconds(animatorDelay+animatorDurationSeconds);
+  Animation animation = Animation::New(initialDurationSeconds);
+  float targetValue(30.0f);
+  float relativeValue(targetValue - startValue);
+
+  animation.AnimateTo(Property(actor, index),
+                      targetValue,
+                      TimePeriod(animatorDelay, animatorDurationSeconds));
+
+  // The duration should have been extended
+  DALI_TEST_EQUALS( animation.GetDuration(), extendedDurationSeconds, TEST_LOCATION );
+
+  // Start the animation
+  animation.Play();
+
+  bool signalReceived(false);
+  AnimationFinishCheck finishCheck(signalReceived);
+  animation.FinishedSignal().Connect(&application, finishCheck);
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(extendedDurationSeconds*500.0f)/* 50% animation progress, 0% animator progress */);
+
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+  DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(extendedDurationSeconds*250.0f)/* 75% animation progress, 50% animator progress */);
+
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+  DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue+(relativeValue*0.5f), TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(extendedDurationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
+
+  // We did expect the animation to finish
+  application.SendNotification();
+  finishCheck.CheckSignalReceived();
+  DALI_TEST_EQUALS( actor.GetProperty<float>(index), targetValue, TEST_LOCATION );
+  END_TEST;
+}
+
index 232c1cd..d5bc8f9 100644 (file)
@@ -286,6 +286,8 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph
 {
   ProxyObject& proxy = dynamic_cast<ProxyObject&>( GetImplementation(target.object) );
 
+  ExtendDuration( period );
+
   switch ( relativeValue.GetType() )
   {
     case Property::BOOLEAN:
@@ -409,6 +411,8 @@ void Animation::AnimateTo(ProxyObject& targetObject, Property::Index targetPrope
   }
   DALI_ASSERT_ALWAYS( type == destinationValue.GetType() && "DestinationValue does not match Target Property type" );
 
+  ExtendDuration( period );
+
   switch (destinationValue.GetType())
   {
     case Property::BOOLEAN:
@@ -524,6 +528,8 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph
 {
   ProxyObject& proxy = dynamic_cast<ProxyObject&>( GetImplementation(target.object) );
 
+  ExtendDuration( period );
+
   switch(keyFrames.GetType())
   {
     case Dali::Property::BOOLEAN:
@@ -660,6 +666,8 @@ void Animation::Animate( Property& target, Property::Type targetType, AnyFunctio
 
   ProxyObject& proxy = dynamic_cast<ProxyObject&>( GetImplementation(target.object) );
 
+  ExtendDuration( period );
+
   switch ( targetType )
   {
     case Property::BOOLEAN:
@@ -827,6 +835,8 @@ void Animation::MoveBy(Actor& actor, const Vector3& displacement, AlphaFunction
 
 void Animation::MoveBy(Actor& actor, const Vector3& displacement, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
                                                          Dali::Actor::POSITION,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -847,6 +857,8 @@ void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alph
 
 void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alpha,  float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
                                                          Dali::Actor::POSITION,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -857,6 +869,8 @@ void Animation::MoveTo(Actor& actor, const Vector3& position, AlphaFunction alph
 
 void Animation::Move(Actor& actor, AnimatorFunctionVector3 func, AlphaFunction alpha,  float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
                                                          Dali::Actor::POSITION,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -877,6 +891,8 @@ void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaF
 
 void Animation::RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
                                                             Dali::Actor::ROTATION,
                                                             Property::INVALID_COMPONENT_INDEX,
@@ -927,6 +943,8 @@ void Animation::RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaF
 
 void Animation::RotateTo(Actor& actor, const Quaternion& rotation, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
                                                             Dali::Actor::ROTATION,
                                                             Property::INVALID_COMPONENT_INDEX,
@@ -937,6 +955,8 @@ void Animation::RotateTo(Actor& actor, const Quaternion& rotation, AlphaFunction
 
 void Animation::Rotate(Actor& actor, AnimatorFunctionQuaternion func, AlphaFunction alpha,  float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Quaternion>::New( actor,
                                                             Dali::Actor::ROTATION,
                                                             Property::INVALID_COMPONENT_INDEX,
@@ -957,6 +977,8 @@ void Animation::ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha)
 
 void Animation::ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
                                                          Dali::Actor::SCALE,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -977,6 +999,8 @@ void Animation::ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha)
 
 void Animation::ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
                                                          Dali::Actor::SCALE,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -987,6 +1011,8 @@ void Animation::ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha,
 
 void Animation::Show(Actor& actor, float delaySeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, 0) );
+
   AddAnimatorConnector( AnimatorConnector<bool>::New( actor,
                                                       Dali::Actor::VISIBLE,
                                                       Property::INVALID_COMPONENT_INDEX,
@@ -997,6 +1023,8 @@ void Animation::Show(Actor& actor, float delaySeconds)
 
 void Animation::Hide(Actor& actor, float delaySeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, 0) );
+
   AddAnimatorConnector( AnimatorConnector<bool>::New( actor,
                                                       Dali::Actor::VISIBLE,
                                                       Property::INVALID_COMPONENT_INDEX,
@@ -1017,6 +1045,8 @@ void Animation::OpacityBy(Actor& actor, float opacity, AlphaFunction alpha)
 
 void Animation::OpacityBy(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
                                                          Dali::Actor::COLOR,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -1037,6 +1067,8 @@ void Animation::OpacityTo(Actor& actor, float opacity, AlphaFunction alpha)
 
 void Animation::OpacityTo(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
                                                          Dali::Actor::COLOR,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -1057,6 +1089,8 @@ void Animation::ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha)
 
 void Animation::ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
                                                          Dali::Actor::COLOR,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -1077,6 +1111,8 @@ void Animation::ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha)
 
 void Animation::ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   AddAnimatorConnector( AnimatorConnector<Vector4>::New( actor,
                                                          Dali::Actor::COLOR,
                                                          Property::INVALID_COMPONENT_INDEX,
@@ -1099,6 +1135,8 @@ void Animation::Resize(Actor& actor, float width, float height, AlphaFunction al
 {
   Vector3 targetSize( width, height, min(width, height) );
 
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   // notify the actor impl that its size is being animated
   actor.OnSizeAnimation( *this, targetSize );
 
@@ -1122,6 +1160,8 @@ void Animation::Resize(Actor& actor, const Vector3& size, AlphaFunction alpha)
 
 void Animation::Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, float delaySeconds, float durationSeconds)
 {
+  ExtendDuration( TimePeriod(delaySeconds, durationSeconds) );
+
   // notify the actor impl that its size is being animated
   actor.OnSizeAnimation( *this, size );
 
@@ -1133,142 +1173,6 @@ void Animation::Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, f
                                                          TimePeriod(delaySeconds, durationSeconds) ) );
 }
 
-void Animation::ParentOriginTo(Actor& actor, const Vector3& parentOrigin)
-{
-  ParentOriginTo(actor, parentOrigin, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::ParentOriginTo(Actor& actor, const Vector3& parentOrigin, AlphaFunction alpha)
-{
-  ParentOriginTo(actor, parentOrigin, alpha, 0.0f, GetDuration());
-}
-
-void Animation::ParentOriginTo(Actor& actor, const Vector3& parentOrigin, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
-  AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
-                                                         Dali::Actor::PARENT_ORIGIN,
-                                                         Property::INVALID_COMPONENT_INDEX,
-                                                         AnimateToVector3(parentOrigin),
-                                                         alpha,
-                                                         TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::AnchorPointTo(Actor& actor, const Vector3& anchorPoint)
-{
-  AnchorPointTo(actor, anchorPoint, mDefaultAlpha, 0.0f, GetDuration());
-}
-
-void Animation::AnchorPointTo(Actor& actor, const Vector3& anchorPoint, AlphaFunction alpha)
-{
-  AnchorPointTo(actor, anchorPoint, alpha, 0.0f, GetDuration());
-}
-
-void Animation::AnchorPointTo(Actor& actor, const Vector3& anchorPoint, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-{
-  AddAnimatorConnector( AnimatorConnector<Vector3>::New( actor,
-                                                         Dali::Actor::ANCHOR_POINT,
-                                                         Property::INVALID_COMPONENT_INDEX,
-                                                         AnimateToVector3(anchorPoint),
-                                                         alpha,
-                                                         TimePeriod(delaySeconds, durationSeconds) ) );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, float value )
-{
-  AnimateProperty( shaderEffect, name, value, GetDefaultAlphaFunction(), 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha )
-{
-  AnimateProperty( shaderEffect, name, value, alpha, 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha, float delaySeconds, float durationSeconds )
-{
-  Property::Value propertyValue( value );
-
-  // Register the property if it does not exist
-  Property::Index index = shaderEffect.GetPropertyIndex( name );
-  if ( Property::INVALID_INDEX == index )
-  {
-    index = shaderEffect.RegisterProperty( name, propertyValue );
-  }
-
-  AnimateTo( shaderEffect, index, Property::INVALID_COMPONENT_INDEX, propertyValue, alpha, TimePeriod(delaySeconds, durationSeconds) );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector2 value )
-{
-  AnimateProperty( shaderEffect, name, value, GetDefaultAlphaFunction(), 0, GetDuration());
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha )
-{
-  AnimateProperty( shaderEffect, name, value, alpha, 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha, float delaySeconds, float durationSeconds )
-{
-  Property::Value propertyValue( value );
-
-  // Register the property if it does not exist
-  Property::Index index = shaderEffect.GetPropertyIndex( name );
-  if ( Property::INVALID_INDEX == index )
-  {
-    index = shaderEffect.RegisterProperty( name, propertyValue );
-  }
-
-  AnimateTo( shaderEffect, index, Property::INVALID_COMPONENT_INDEX, propertyValue, alpha, TimePeriod(delaySeconds, durationSeconds) );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector3 value )
-{
-  AnimateProperty( shaderEffect, name, value, GetDefaultAlphaFunction(), 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha )
-{
-  AnimateProperty( shaderEffect, name, value, alpha, 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha, float delaySeconds, float durationSeconds )
-{
-  Property::Value propertyValue( value );
-
-  // Register the property if it does not exist
-  Property::Index index = shaderEffect.GetPropertyIndex( name );
-  if ( Property::INVALID_INDEX == index )
-  {
-    index = shaderEffect.RegisterProperty( name, propertyValue );
-  }
-
-  AnimateTo( shaderEffect, index, Property::INVALID_COMPONENT_INDEX, propertyValue, alpha, TimePeriod(delaySeconds, durationSeconds) );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector4 value )
-{
-  AnimateProperty( shaderEffect, name, value, GetDefaultAlphaFunction(), 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha )
-{
-  AnimateProperty( shaderEffect, name, value, alpha, 0, GetDuration() );
-}
-
-void Animation::AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha, float delaySeconds, float durationSeconds )
-{
-  Property::Value propertyValue( value );
-
-  // Register the property if it does not exist
-  Property::Index index = shaderEffect.GetPropertyIndex( name );
-  if ( Property::INVALID_INDEX == index )
-  {
-    index = shaderEffect.RegisterProperty( name, propertyValue );
-  }
-
-  AnimateTo( shaderEffect, index, Property::INVALID_COMPONENT_INDEX, propertyValue, alpha, TimePeriod(delaySeconds, durationSeconds) );
-}
-
 bool Animation::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
 {
   bool done = false;
@@ -1320,6 +1224,16 @@ void Animation::SetCurrentProgress(float progress)
   }
 }
 
+void Animation::ExtendDuration( const TimePeriod& timePeriod )
+{
+  float duration = timePeriod.delaySeconds + timePeriod.durationSeconds;
+
+  if( duration > mDurationSeconds )
+  {
+    SetDuration( duration );
+  }
+}
+
 } // namespace Internal
 
 } // namespace Dali
index 4cd86b9..775637c 100644 (file)
@@ -787,126 +787,6 @@ public:
    */
   void Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, float delaySeconds, float durationSeconds);
 
-  /**
-   * Animate the parent-origin of an actor.
-   * The effect will start & end when the animation begins & ends.
-   * @param [in] actor The actor to animate.
-   * @param [in] parentOrigin The target value.
-   */
-  void ParentOriginTo(Actor& actor, const Vector3& parentOrigin);
-
-  /**
-   * Animate the parent-origin of an actor.
-   * This overload allows the alpha function to be customized.
-   * The effect will start & end when the animation begins & ends.
-   * @param [in] actor The actor to animate.
-   * @param [in] parentOrigin The target value.
-   * @param [in] alpha The alpha function to apply.
-   */
-  void ParentOriginTo(Actor& actor, const Vector3& parentOrigin, AlphaFunction alpha);
-
-  /**
-   * Animate the parent-origin of an actor.
-   * This overload allows the start & end time to be customized.
-   * @pre delaySeconds & durationSeconds must be zero or greater.
-   * @param [in] actor The actor to animate.
-   * @param [in] parentOrigin The target value.
-   * @param [in] alpha The alpha function to apply.
-   * @param [in] delaySeconds The initial delay from the start of the effect.
-   * @param [in] durationSeconds The duration of the effect.
-   */
-  void ParentOriginTo(Actor& actor, const Vector3& parentOrigin, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
-  /**
-   * Animate the anchor-point of an actor.
-   * The effect will start & end when the animation begins & ends.
-   * @param [in] actor The actor to animate.
-   * @param [in] anchorPoint The target value.
-   */
-  void AnchorPointTo(Actor& actor, const Vector3& anchorPoint);
-
-  /**
-   * Animate the anchor-point of an actor.
-   * This overload allows the alpha function to be customized.
-   * The effect will start & end when the animation begins & ends.
-   * @param [in] actor The actor to animate.
-   * @param [in] anchorPoint The target value.
-   * @param [in] alpha The alpha function to apply.
-   */
-  void AnchorPointTo(Actor& actor, const Vector3& anchorPoint, AlphaFunction alpha);
-
-  /**
-   * Animate the anchor-point of an actor.
-   * This overload allows the start & end time to be customized.
-   * @pre delaySeconds & durationSeconds must be zero or greater.
-   * @param [in] actor The actor to animate.
-   * @param [in] anchorPoint The target value.
-   * @param [in] alpha The alpha function to apply.
-   * @param [in] delaySeconds The initial delay from the start of the effect.
-   * @param [in] durationSeconds The duration of the effect.
-   */
-  void AnchorPointTo(Actor& actor, const Vector3& anchorPoint, AlphaFunction alpha, float delaySeconds, float durationSeconds);
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, float value)
-   */
-  void AnimateProperty( Internal::ShaderEffect& shaderEffect, const std::string& name, float value );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha)
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, float value, AlphaFunction alpha, float delaySeconds, float durationSeconds );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector2 value, AlphaFunction alpha, float delaySeconds, float durationSeconds );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha, float delaySeconds, float durationSeconds )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector3 value, AlphaFunction alpha, float delaySeconds, float durationSeconds );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value )
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha)
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha );
-
-  /**
-   * @copydoc Dali::Animation::AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha, float delaySeconds, float durationSeconds)
-   */
-  void AnimateProperty( ShaderEffect& shaderEffect, const std::string& name, Vector4 value, AlphaFunction alpha, float delaySeconds, float durationSeconds );
-
   /*
    * @copydoc Dali::Animation::GetCurrentProgress()
    */
@@ -983,6 +863,12 @@ protected:
 
 private:
 
+  /**
+   * Extends the duration when an animator is added with TimePeriod that exceeds current duration.
+   * @param[in] timePeriod The time period for an animator.
+   */
+  void ExtendDuration( const TimePeriod& timePeriod );
+
   // Undefined
   Animation(const Animation&);