From a63fb5553a340db093a58c5ccdbdf41c5beb928b Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Tue, 30 May 2017 16:15:35 +0900 Subject: [PATCH] Revert "[Tizen] (Animation) Ensure AnimateBetween updates the cached event-side properties" This reverts commit 6c20d722e86139148c82bdf9a79d041db5a5fb7f. Change-Id: I050f4549e48f7070fad8984adc891d7aaae3e3a5 --- automated-tests/src/dali/utc-Dali-Animation.cpp | 3 -- dali/internal/event/animation/animation-impl.cpp | 8 --- dali/internal/event/animation/key-frames-impl.cpp | 65 ----------------------- dali/internal/event/animation/key-frames-impl.h | 5 -- 4 files changed, 81 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index 6a1cc97..3789489 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -8482,9 +8482,6 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) // Start the animation animation.Play(); - // Final key frame value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), 0.9f, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index 69c0040..2b0bf2e 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -640,14 +640,6 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph ExtendDuration( period ); - // Store data to later notify the object that its property is being animated - ConnectorTargetValues connectorPair; - connectorPair.targetValue = keyFrames.GetLastKeyFrameValue(); - connectorPair.connectorIndex = mConnectors.Count(); - connectorPair.timePeriod = period; - connectorPair.propertyChangeType = Object::PropertyChange::SET; - mConnectorTargetValues.push_back( connectorPair ); - switch(keyFrames.GetType()) { case Dali::Property::BOOLEAN: diff --git a/dali/internal/event/animation/key-frames-impl.cpp b/dali/internal/event/animation/key-frames-impl.cpp index d0ad603..031495e 100644 --- a/dali/internal/event/animation/key-frames-impl.cpp +++ b/dali/internal/event/animation/key-frames-impl.cpp @@ -23,22 +23,6 @@ namespace Dali namespace Internal { -namespace -{ - -/// Helper to retrieve the value of the final key frame -template< typename PropertyType, typename KeyFrameType > -inline void GetLastKeyFrameValueInternal( const IntrusivePtr< KeyFrameSpec >& keyFrames, Property::Value& value ) -{ - KeyFrameType* kf = static_cast< KeyFrameType* >( keyFrames.Get() ); - float time = 0; - PropertyType actualValue; - kf->GetKeyFrame( kf->GetNumberOfKeyFrames() - 1, time, actualValue ); - value = actualValue; -} - -} // unnamed namespace - KeyFrames* KeyFrames::New() { return new KeyFrames(); @@ -176,54 +160,5 @@ KeyFrameSpec* KeyFrames::GetKeyFramesBase() const return mKeyFrames.Get(); } -Property::Value KeyFrames::GetLastKeyFrameValue() const -{ - Property::Value value; - - switch(mType) - { - case Property::BOOLEAN: - { - GetLastKeyFrameValueInternal< bool, KeyFrameBoolean >( mKeyFrames, value ); - break; - } - case Property::INTEGER: - { - GetLastKeyFrameValueInternal< int, KeyFrameInteger >( mKeyFrames, value ); - break; - } - case Property::FLOAT: - { - GetLastKeyFrameValueInternal< float, KeyFrameNumber >( mKeyFrames, value ); - break; - } - case Property::VECTOR2: - { - GetLastKeyFrameValueInternal< Vector2, KeyFrameVector2 >( mKeyFrames, value ); - break; - } - case Property::VECTOR3: - { - GetLastKeyFrameValueInternal< Vector3, KeyFrameVector3 >( mKeyFrames, value ); - break; - } - case Property::VECTOR4: - { - GetLastKeyFrameValueInternal< Vector4, KeyFrameVector4 >( mKeyFrames, value ); - break; - } - case Property::ROTATION: - { - GetLastKeyFrameValueInternal< Quaternion, KeyFrameQuaternion >( mKeyFrames, value ); - break; - } - default: - DALI_ASSERT_DEBUG(!"Type not supported"); - break; - } - - return value; -} - } // Internal } // Dali diff --git a/dali/internal/event/animation/key-frames-impl.h b/dali/internal/event/animation/key-frames-impl.h index 52d9384..433d2bc 100644 --- a/dali/internal/event/animation/key-frames-impl.h +++ b/dali/internal/event/animation/key-frames-impl.h @@ -95,11 +95,6 @@ public: */ KeyFrameSpec* GetKeyFramesBase() const; - /** - * Return the value of the last key frame. - */ - Dali::Property::Value GetLastKeyFrameValue() const; - private: Dali::Property::Type mType; // Type of the specialization IntrusivePtr mKeyFrames; // Pointer to the specialized key frame object -- 2.7.4