From: Jinho, Lee Date: Tue, 30 May 2017 07:17:43 +0000 (+0900) Subject: Revert "[Tizen] Ensure cached values of properties animated using AnimateTo are updated" X-Git-Tag: accepted/tizen/unified/20170608.072246~12 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=9445ba05fb68ad34a0e819c5fe909f1505ecf9d1 Revert "[Tizen] Ensure cached values of properties animated using AnimateTo are updated" This reverts commit 170e0f5cde273cecde1990e5943cdaad8933e65a. Change-Id: Ie0cf57dd4bc3c9d49694f86ed784709af98e033d --- diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 4794369..f4a6071 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -5960,7 +5960,6 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void) END_TEST; } - int utcDaliActorVisibilityChangeSignalSelf(void) { TestApplication application; @@ -6043,43 +6042,4 @@ int utcDaliActorVisibilityChangeSignalChildren(void) childData.Check( false /* not called */, TEST_LOCATION ); grandChildData.Check( false /* not called */, TEST_LOCATION ); - END_TEST; -} - -int utcDaliActorVisibilityChangeSignalAfterAnimation(void) -{ - TestApplication application; - tet_infoline( "Check that the visibility change signal is emitted when the visibility changes when an animation starts" ); - - Actor actor = Actor::New(); - Stage::GetCurrent().Add( actor ); - - application.SendNotification(); - application.Render(); - - VisibilityChangedFunctorData data; - DevelActor::VisibilityChangedSignal( actor ).Connect( &application, VisibilityChangedFunctor( data ) ); - - Animation animation = Animation::New( 1.0f ); - animation.AnimateTo( Property( actor, Actor::Property::VISIBLE ), false ); - - data.Check( false, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), true, TEST_LOCATION ); - - tet_infoline( "Play the animation and check the property value" ); - animation.Play(); - - data.Check( true /* called */, actor, false /* not visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); - - tet_infoline( "Animation not currently finished, so the current visibility should still be true" ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), true, TEST_LOCATION ); - - application.SendNotification(); - application.Render( 1100 ); // After the animation - - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< bool >( actor, Actor::Property::VISIBLE ), false, TEST_LOCATION ); - - END_TEST; -} + END_TEST;} diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index 2a46bf5..36fb592 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -5781,11 +5781,10 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f)/* 50% animation progress, 0% animator progress */); - // We didn't expect the animation to finish yet, but cached value should be the final one + // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), targetValue, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty( actor, index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5802,7 +5801,6 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -6520,21 +6518,9 @@ int UtcDaliAnimationAnimateToActorSizeP(void) Vector3 ninetyNinePercentProgress(targetSize * 0.99f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), 0.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), 0.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), 0.0f, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), targetSize.width, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6642,17 +6628,9 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) float fiftyPercentProgress(startValue + (targetWidth - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( targetWidth, 0.0f, 0.0f ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), targetWidth, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6694,17 +6672,9 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) float fiftyPercentProgress(startValue + (targetHeight - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 0.0f, targetHeight, 0.0f ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetHeight, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6746,17 +6716,9 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) float fiftyPercentProgress(startValue + (targetDepth - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 0.0f, 0.0f, targetDepth ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetDepth, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6906,21 +6868,9 @@ int UtcDaliAnimationAnimateToActorPositionP(void) Vector3 seventyFivePercentProgress(targetPosition * 0.75f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), 0.0f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), 0.0f, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), targetPosition.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetPosition.y, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetPosition.z, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6963,17 +6913,9 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) float fiftyPercentProgress(startValue + (targetX - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( targetX, 0.0f, 0.0f ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), targetX, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7019,17 +6961,9 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) float fiftyPercentProgress(startValue + (targetY - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, targetY, 0.0f ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetY, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7075,17 +7009,9 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) float fiftyPercentProgress(startValue + (targetZ - startValue)*0.5f); - // Should return the initial properties before play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), startValue, TEST_LOCATION ); - // Start the animation animation.Play(); - // Should return the target property after play - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, targetZ ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetZ, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7284,9 +7210,6 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7581,12 +7504,6 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_X ), targetScale.x, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetScale.y, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetScale.z, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7702,10 +7619,6 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( targetX, startValue, startValue ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_X ), targetX, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7760,10 +7673,6 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( startValue, targetY, startValue ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetY, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7818,10 +7727,6 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( startValue, startValue, targetZ ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7870,14 +7775,6 @@ int UtcDaliAnimationAnimateToActorColorP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_RED ), targetColor.r, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), targetColor.g, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( DevelActor::Property::OPACITY ), targetColor.a, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -8003,10 +7900,6 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( targetRed, startValue, startValue, startValue ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_RED ), targetRed, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -8065,10 +7958,6 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, targetGreen, startValue, startValue ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), targetGreen, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -8127,10 +8016,6 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, targetBlue, startValue ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -8189,11 +8074,6 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // Start the animation animation.Play(); - // Target value should be retrievable straight away - DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, startValue, targetAlpha ), TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetAlpha, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( DevelActor::Property::OPACITY ), targetAlpha, TEST_LOCATION ); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -10205,11 +10085,10 @@ int UtcDaliAnimationExtendDurationP(void) application.SendNotification(); application.Render(static_cast(extendedDurationSeconds*500.0f)/* 50% animation progress, 0% animator progress */); - // We didn't expect the animation to finish yet, but cached value should be the final one + // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty< float >( index ), targetValue, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(extendedDurationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -10226,7 +10105,6 @@ int UtcDaliAnimationExtendDurationP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty< float >( index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -10597,7 +10475,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionCol // Build the animation Animation animation = Animation::New(2.0f); - tet_infoline("Set target size in animation without initiating play"); + tet_infoline("Set target size in animation without intiating play"); animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetSizes[0], AlphaFunction::LINEAR); tet_infoline("Set target position in animation without intiating play"); animation.AnimateTo(Property(actor, Actor::Property::COLOR_RED), targetColors[0], AlphaFunction::LINEAR); @@ -10606,7 +10484,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionCol application.SendNotification(); application.Render(); - tet_infoline("Ensure position of actor is still at initial size and position"); + tet_infoline("Ensure position of actor is still at intial size and position"); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), initialSize.x, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), initialSize.y, TEST_LOCATION ); @@ -10618,7 +10496,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionCol application.SendNotification(); application.Render(2000u); - tet_infoline("Ensure position and size of actor is at target value when animation playing"); + tet_infoline("Ensure position and size of actor is at target value when aninmation playing"); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), targetSizes[1].x, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), targetSizes[1].y, TEST_LOCATION ); diff --git a/automated-tests/src/dali/utc-Dali-Constrainer.cpp b/automated-tests/src/dali/utc-Dali-Constrainer.cpp index 33e6ec9..e212720 100644 --- a/automated-tests/src/dali/utc-Dali-Constrainer.cpp +++ b/automated-tests/src/dali/utc-Dali-Constrainer.cpp @@ -189,14 +189,14 @@ int UtcPathConstrainerApplyRange(void) Vector3 position, tangent; float tValue; - DevelHandle::GetCurrentProperty( actor, index ).Get(tValue); + actor.GetProperty(index).Get(tValue); float currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); - DevelHandle::GetCurrentProperty( actor, index ).Get(tValue); + actor.GetProperty(index).Get(tValue); currentCursor = ( tValue - range.x ) / (range.y-range.x); path.Sample(currentCursor, position, tangent ); path.Sample(0.5, position, tangent ); @@ -223,12 +223,6 @@ int UtcPathConstrainerApplyRange(void) path.Sample(currentCursor, position, tangent ); DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - // Ensure GetProperty also returns the final result - actor.GetProperty( index ).Get( tValue ); - currentCursor = ( tValue - range.x ) / (range.y-range.x); - path.Sample(currentCursor, position, tangent ); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION ); - END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-RenderTask.cpp b/automated-tests/src/dali/utc-Dali-RenderTask.cpp index 7e9ad26..061cb62 100644 --- a/automated-tests/src/dali/utc-Dali-RenderTask.cpp +++ b/automated-tests/src/dali/utc-Dali-RenderTask.cpp @@ -1431,14 +1431,9 @@ int UtcDaliRenderTaskSetViewportPosition(void) animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, AlphaFunction::LINEAR ); animation.Play(); - DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition2, TEST_LOCATION ); - // Perform 1000ms worth of updates at which point animation should have completed. Wait(application, 1000); DALI_TEST_EQUALS( task.GetCurrentViewportPosition(), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_POSITION ), newPosition3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); END_TEST; } @@ -1488,14 +1483,9 @@ int UtcDaliRenderTaskSetViewportSize(void) animation.AnimateTo( Property( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, AlphaFunction::LINEAR ); animation.Play(); - DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize2, TEST_LOCATION ); - // Perform 1000ms worth of updates at which point animation should have completed. Wait(application, 1000); DALI_TEST_EQUALS( task.GetCurrentViewportSize(), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( task, RenderTask::Property::VIEWPORT_SIZE ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( task.GetProperty< Vector2 >( RenderTask::Property::VIEWPORT_SIZE ), newSize3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); END_TEST; } @@ -1531,20 +1521,6 @@ int UtcDaliRenderTaskSetClearColorP(void) DALI_TEST_EQUALS( task.GetClearColor(), testColor2, TEST_LOCATION ); DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION ); DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION ); - - Vector4 newColor3(10.0f, 10.0f, 20.0f, 30.0f); - Animation animation = Animation::New(1.0f); - animation.AnimateTo( Property( task, RenderTask::Property::CLEAR_COLOR ), newColor3, AlphaFunction::LINEAR ); - animation.Play(); - - DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), testColor2, TEST_LOCATION ); - - // Perform 1000ms worth of updates at which point animation should have completed. - Wait(application, 1000); - DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( task, RenderTask::Property::CLEAR_COLOR ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - DALI_TEST_EQUALS( task.GetProperty< Vector4 >( RenderTask::Property::CLEAR_COLOR ), newColor3, Math::MACHINE_EPSILON_1, TEST_LOCATION ); - END_TEST; } diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 8df598e..6ca8901 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1056,7 +1056,19 @@ Matrix Actor::GetCurrentWorldMatrix() const void Actor::SetVisible( bool visible ) { - SetVisibleInternal( visible, SendMessage::TRUE ); + if( mVisible != visible ) + { + if( NULL != mNode ) + { + // mNode is being used in a separate thread; queue a message to set the value & base value + SceneGraph::NodePropertyMessage::Send( GetEventThreadServices(), mNode, &mNode->mVisible, &AnimatableProperty::Bake, visible ); + } + + mVisible = visible; + + // Emit the signal on this actor and all its children + EmitVisibilityChangedSignalRecursively( this, visible, DevelActor::VisibilityChange::SELF ); + } } bool Actor::IsVisible() const @@ -1278,6 +1290,53 @@ void Actor::SetSizeInternal( const Vector3& size ) } } +void Actor::NotifySizeAnimation( Animation& animation, const Vector3& targetSize ) +{ + mTargetSize = targetSize; + + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); +} + +void Actor::NotifySizeAnimation( Animation& animation, float targetSize, Property::Index property ) +{ + if ( Dali::Actor::Property::SIZE_WIDTH == property ) + { + mTargetSize.width = targetSize; + } + else if ( Dali::Actor::Property::SIZE_HEIGHT == property ) + { + mTargetSize.height = targetSize; + } + else if ( Dali::Actor::Property::SIZE_DEPTH == property ) + { + mTargetSize.depth = targetSize; + } + // Notify deriving classes + OnSizeAnimation( animation, mTargetSize ); +} + +void Actor::NotifyPositionAnimation( Animation& animation, const Vector3& targetPosition ) +{ + mTargetPosition = targetPosition; +} + +void Actor::NotifyPositionAnimation( Animation& animation, float targetPosition, Property::Index property ) +{ + if ( Dali::Actor::Property::POSITION_X == property ) + { + mTargetPosition.x = targetPosition; + } + else if ( Dali::Actor::Property::POSITION_Y == property ) + { + mTargetPosition.y = targetPosition; + } + else if ( Dali::Actor::Property::POSITION_Z == property ) + { + mTargetPosition.z = targetPosition; + } +} + void Actor::SetWidth( float width ) { if( IsRelayoutEnabled() && !mRelayoutData->insideRelayout ) @@ -3242,149 +3301,6 @@ Property::Value Actor::GetDefaultPropertyCurrentValue( Property::Index index ) c return value; } -void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ) -{ - switch( index ) - { - case Dali::Actor::Property::SIZE: - { - if( value.Get( mTargetSize ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } - - case Dali::Actor::Property::SIZE_WIDTH: - { - if( value.Get( mTargetSize.width ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } - - case Dali::Actor::Property::SIZE_HEIGHT: - { - if( value.Get( mTargetSize.height ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } - - case Dali::Actor::Property::SIZE_DEPTH: - { - if( value.Get( mTargetSize.depth ) ) - { - // Notify deriving classes - OnSizeAnimation( animation, mTargetSize ); - } - break; - } - - case Dali::Actor::Property::POSITION: - { - value.Get( mTargetPosition ); - break; - } - - case Dali::Actor::Property::POSITION_X: - { - value.Get( mTargetPosition.x ); - break; - } - - case Dali::Actor::Property::POSITION_Y: - { - value.Get( mTargetPosition.y ); - break; - } - - case Dali::Actor::Property::POSITION_Z: - { - value.Get( mTargetPosition.z ); - break; - } - - case Dali::Actor::Property::ORIENTATION: - { - value.Get( mTargetOrientation ); - break; - } - - case Dali::Actor::Property::SCALE: - { - value.Get( mTargetScale ); - break; - } - - case Dali::Actor::Property::SCALE_X: - { - value.Get( mTargetScale.x ); - break; - } - - case Dali::Actor::Property::SCALE_Y: - { - value.Get( mTargetScale.y ); - break; - } - - case Dali::Actor::Property::SCALE_Z: - { - value.Get( mTargetScale.z ); - break; - } - - case Dali::Actor::Property::VISIBLE: - { - SetVisibleInternal( value.Get< bool >(), SendMessage::FALSE ); - break; - } - - case Dali::Actor::Property::COLOR: - { - value.Get( mTargetColor ); - break; - } - - case Dali::Actor::Property::COLOR_RED: - { - value.Get( mTargetColor.r ); - break; - } - - case Dali::Actor::Property::COLOR_GREEN: - { - value.Get( mTargetColor.g ); - break; - } - - case Dali::Actor::Property::COLOR_BLUE: - { - value.Get( mTargetColor.b ); - break; - } - - case Dali::Actor::Property::COLOR_ALPHA: - case Dali::DevelActor::Property::OPACITY: - { - value.Get( mTargetColor.a ); - break; - } - - default: - { - // Not an animatable property. Do nothing. - break; - } - } -} - const SceneGraph::PropertyOwner* Actor::GetPropertyOwner() const { return mNode; @@ -4307,12 +4223,6 @@ bool Actor::GetCurrentPropertyValue( Property::Index index, Property::Value& val break; } - case Dali::Actor::Property::VISIBLE: - { - value = IsVisible(); - break; - } - default: { // Must be an event-side only property @@ -5069,23 +4979,6 @@ Object* Actor::GetParentObject() const return mParent; } -void Actor::SetVisibleInternal( bool visible, SendMessage::Type sendMessage ) -{ - if( mVisible != visible ) - { - if( sendMessage == SendMessage::TRUE && NULL != mNode ) - { - // mNode is being used in a separate thread; queue a message to set the value & base value - SceneGraph::NodePropertyMessage::Send( GetEventThreadServices(), mNode, &mNode->mVisible, &AnimatableProperty::Bake, visible ); - } - - mVisible = visible; - - // Emit the signal on this actor and all its children - EmitVisibilityChangedSignalRecursively( this, visible, DevelActor::VisibilityChange::SELF ); - } -} - void Actor::SetSiblingOrder( unsigned int order ) { mSiblingOrder = std::min( order, static_cast( DevelLayer::SIBLING_ORDER_MULTIPLIER ) ); diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index 59e23d0..6eac5aa 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -619,7 +619,7 @@ public: /** * Sets the visibility flag of an actor. - * @param[in] visible The new visibility flag. + * @param [in] visible The new visibility flag. */ void SetVisible( bool visible ); @@ -1486,6 +1486,23 @@ public: // For Animation /** + * This should only be called by Animation, when the actors SIZE property is animated. + * + * @param[in] animation The animation that resized the actor + * @param[in] targetSize The new target size of the actor + */ + void NotifySizeAnimation( Animation& animation, const Vector3& targetSize ); + + /** + * This should only be called by Animation, when the actors SIZE_WIDTH or SIZE_HEIGHT or SIZE_DEPTH property is animated. + * + * @param[in] animation The animation that resized the actor + * @param[in] targetSize The new target size of the actor + * @param[in] property The index of the property being animated + */ + void NotifySizeAnimation( Animation& animation, float targetSize, Property::Index property ); + + /** * For use in derived classes. * This should only be called by Animation, when the actor is resized using Animation::Resize(). */ @@ -1493,6 +1510,23 @@ public: { } + /** + * This should only be called by Animation, when the actors POSITION property is animated. + * + * @param[in] animation The animation that repositioned the actor + * @param[in] targetPosition The new target position of the actor + */ + void NotifyPositionAnimation( Animation& animation, const Vector3& targetPosition ); + + /** + * This should only be called by Animation, when the actors POSITION_X or POSITION_Y or POSITION_Z property is animated. + * + * @param[in] animation The animation that repositioned the actor + * @param[in] targetPosition The new target position of the actor + * @param[in] property The index of the property being animated + */ + void NotifyPositionAnimation( Animation& animation, float targetPosition, Property::Index property ); + protected: enum DerivedType @@ -1654,11 +1688,6 @@ public: virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const; /** - * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation() - */ - virtual void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ); - - /** * @copydoc Dali::Internal::Object::GetPropertyOwner() */ virtual const SceneGraph::PropertyOwner* GetPropertyOwner() const; @@ -1715,15 +1744,6 @@ public: private: - struct SendMessage - { - enum Type - { - FALSE = 0, - TRUE = 1, - }; - }; - // Undefined Actor(); @@ -1902,6 +1922,7 @@ private: */ bool ShiftSiblingsLevels( ActorContainer& siblings, int targetLevelToShiftFrom ); + /** * @brief Get the current position of the actor in screen coordinates. * @@ -1909,13 +1930,6 @@ private: */ const Vector2 GetCurrentScreenPosition() const; - /** - * Sets the visibility flag of an actor. - * @param[in] visible The new visibility flag. - * @param[in] sendMessage Whether to send a message to the update thread or not. - */ - void SetVisibleInternal( bool visible, SendMessage::Type sendMessage ); - protected: Actor* mParent; ///< Each actor (except the root) can have one parent diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index c27f31b..c09c4b1 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,12 +22,14 @@ // EXTERNAL INCLUDES // INTERNAL INCLUDES +#include #include #include #include #include #include #include +#include #include #include #include @@ -265,33 +267,71 @@ void Animation::Play() mState = Dali::Animation::PLAYING; - if( mEndAction != EndAction::Discard ) // If the animation is discarded, then we do not want to change the target values + unsigned int connectorTargetValuesIndex( 0 ); + unsigned int numberOfConnectorTargetValues = mConnectorActorTargetValues.size(); + + /* + * Loop through all Animator connectors, if connector index matches the current index stored in mConnectorActorTargetValues container then + * should apply target values for this index to the Actor. + * Confirm object is an actor and it is a POSITION or SIZE Property Index before sending Notify message to Actor. + */ + for ( unsigned int connectorIndex = 0; connectorIndex < mConnectors.Count(); connectorIndex ++) { - unsigned int connectorTargetValuesIndex( 0 ); - unsigned int numberOfConnectorTargetValues = mConnectorTargetValues.size(); - - /* - * Loop through all Animator connectors, if connector index matches the current index stored in mConnectorTargetValues container then - * should apply target values for this index to the object. - */ - for ( unsigned int connectorIndex = 0; connectorIndex < mConnectors.Count(); connectorIndex ++) + // Use index to check if the current connector is next in the mConnectorActorTargetValues container, meaning targetValues have been pushed in AnimateXXFunction + if ( connectorTargetValuesIndex < numberOfConnectorTargetValues ) { - // Use index to check if the current connector is next in the mConnectorTargetValues container, meaning targetValues have been pushed in AnimateXXFunction - if ( connectorTargetValuesIndex < numberOfConnectorTargetValues ) + ConnectorTargetValues& connectorPair = mConnectorActorTargetValues[ connectorTargetValuesIndex ]; + + if ( connectorPair.connectorIndex == connectorIndex ) { - ConnectorTargetValues& connectorPair = mConnectorTargetValues[ connectorTargetValuesIndex ]; + // Current connector index matches next in the stored connectors with target values so apply target value. + connectorTargetValuesIndex++; // Found a match for connector so increment index to next one - if ( connectorPair.connectorIndex == connectorIndex ) - { - // Current connector index matches next in the stored connectors with target values so apply target value. - connectorTargetValuesIndex++; // Found a match for connector so increment index to next one + AnimatorConnectorBase* connector = mConnectors[ connectorIndex ]; - AnimatorConnectorBase* connector = mConnectors[ connectorIndex ]; + Actor* maybeActor = static_cast( connector->GetObject() ); // Only Actors would be in mConnectorActorTargetValues container - Object* object = connector->GetObject(); - if( object ) + if ( maybeActor ) + { + // Get Stored Target Value and corresponding connector index + const Property::Type valueType = connectorPair.targetValue.GetType(); + Property::Index propertyIndex = connector->GetPropertyIndex(); + + if ( valueType == Property::VECTOR3 ) + { + Vector3 targetVector3 = connectorPair.targetValue.Get(); + + if ( propertyIndex == Dali::Actor::Property::POSITION ) + { + maybeActor->NotifyPositionAnimation( *this, targetVector3 ); + } + else if ( propertyIndex == Dali::Actor::Property::SIZE ) + { + maybeActor->NotifySizeAnimation( *this, targetVector3 ); + } + } + else if ( valueType == Property::FLOAT ) + { + float targetFloat = connectorPair.targetValue.Get(); + + if ( ( Dali::Actor::Property::POSITION_X == propertyIndex ) || + ( Dali::Actor::Property::POSITION_Y == propertyIndex ) || + ( Dali::Actor::Property::POSITION_Z == propertyIndex ) ) + { + maybeActor->NotifyPositionAnimation( *this, targetFloat, propertyIndex ); + } + else if ( ( Dali::Actor::Property::SIZE_WIDTH == propertyIndex ) || + ( Dali::Actor::Property::SIZE_HEIGHT == propertyIndex ) || + ( Dali::Actor::Property::SIZE_DEPTH == propertyIndex ) ) + + { + maybeActor->NotifySizeAnimation( *this, targetFloat, propertyIndex ); + } + } + else { - object->NotifyPropertyAnimation( *this, connector->GetPropertyIndex(), connectorPair.targetValue ); + // Currently only FLOAT and VECTOR3 is supported for Target values in AnimateXXFunctions + DALI_LOG_WARNING("Animation::Play Unsupported Value Type provided as TargetValue\n"); } } } @@ -344,9 +384,6 @@ void Animation::Clear() // Remove all the connectors mConnectors.Clear(); - // Reset the connector target values - mConnectorTargetValues.clear(); - // Replace the old scene-object with a new one DestroySceneObject(); CreateSceneObject(); @@ -509,12 +546,6 @@ void Animation::AnimateTo(Object& targetObject, Property::Index targetPropertyIn ExtendDuration( period ); - // Store data to later notify the object that its property is being animated - ConnectorTargetValues connectorPair; - connectorPair.targetValue = destinationValue; - connectorPair.connectorIndex = mConnectors.Count(); - mConnectorTargetValues.push_back( connectorPair ); - switch ( destinationType ) { case Property::BOOLEAN: @@ -541,6 +572,26 @@ void Animation::AnimateTo(Object& targetObject, Property::Index targetPropertyIn case Property::FLOAT: { + if ( ( Dali::Actor::Property::SIZE_WIDTH == targetPropertyIndex ) || + ( Dali::Actor::Property::SIZE_HEIGHT == targetPropertyIndex ) || + ( Dali::Actor::Property::SIZE_DEPTH == targetPropertyIndex ) || + ( Dali::Actor::Property::POSITION_X == targetPropertyIndex ) || + ( Dali::Actor::Property::POSITION_Y == targetPropertyIndex ) || + ( Dali::Actor::Property::POSITION_Z == targetPropertyIndex ) ) + { + + Actor* maybeActor = dynamic_cast( &targetObject ); + if ( maybeActor ) + { + // Store data to later notify the actor that its size or position is being animated + ConnectorTargetValues connectorPair; + connectorPair.targetValue = destinationValue; + connectorPair.connectorIndex = mConnectors.Count(); + + mConnectorActorTargetValues.push_back( connectorPair ); + } + } + AddAnimatorConnector( AnimatorConnector::New( targetObject, targetPropertyIndex, componentIndex, @@ -563,6 +614,21 @@ void Animation::AnimateTo(Object& targetObject, Property::Index targetPropertyIn case Property::VECTOR3: { + if ( Dali::Actor::Property::SIZE == targetPropertyIndex || Dali::Actor::Property::POSITION == targetPropertyIndex ) + { + // Test whether this is actually an Actor + Actor* maybeActor = dynamic_cast( &targetObject ); + if ( maybeActor ) + { + // Store data to later notify the actor that its size or position is being animated + ConnectorTargetValues connectorPair; + connectorPair.targetValue = destinationValue; + connectorPair.connectorIndex = mConnectors.Count(); + + mConnectorActorTargetValues.push_back( connectorPair ); + } + } + AddAnimatorConnector( AnimatorConnector::New( targetObject, targetPropertyIndex, componentIndex, diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index fa28101..7239ed4 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -469,7 +469,7 @@ private: AnimatorConnectorContainer mConnectors; ///< Owned by the Animation - std::vector< ConnectorTargetValues > mConnectorTargetValues; //< Used to store animating property target value information + std::vector< ConnectorTargetValues > mConnectorActorTargetValues; //< Store Actor target values and matchinf connector index that need to set value on Animation::Play // Cached for public getters float mDurationSeconds; diff --git a/dali/internal/event/common/object-impl.cpp b/dali/internal/event/common/object-impl.cpp index 344e72c..d43ccf7 100644 --- a/dali/internal/event/common/object-impl.cpp +++ b/dali/internal/event/common/object-impl.cpp @@ -924,32 +924,6 @@ void Object::RemovePropertyNotifications() } } -void Object::NotifyPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ) -{ - if ( index < DEFAULT_PROPERTY_MAX_COUNT ) - { - OnNotifyDefaultPropertyAnimation( animation, index, value ); - } - else if ( ( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ) ) - { - AnimatablePropertyMetadata* animatableProperty = FindAnimatableProperty( index ); - if( animatableProperty ) - { - // update the cached property value - animatableProperty->SetPropertyValue( value ); - } - } - else - { - CustomPropertyMetadata* custom = FindCustomProperty( index ); - if( custom && custom->IsAnimatable() ) - { - // update the cached property value - custom->SetPropertyValue( value ); - } - } -} - void Object::EnablePropertyNotifications() { if( mPropertyNotifications ) diff --git a/dali/internal/event/common/object-impl.h b/dali/internal/event/common/object-impl.h index 035e7ee..d378674 100644 --- a/dali/internal/event/common/object-impl.h +++ b/dali/internal/event/common/object-impl.h @@ -41,7 +41,6 @@ class PropertyNotification; namespace Internal { -class Animation; class ConstraintBase; class EventThreadServices; class Handle; @@ -240,14 +239,6 @@ public: */ virtual void RemovePropertyNotifications(); - /** - * Notifies that a property is being animated. - * @param[in] animation The animation animating the property. - * @param[in] index The index of the property. - * @param[in] value The value of the property after the animation. - */ - void NotifyPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ); - /******************************** Uniform Mappings ********************************/ /** @@ -488,15 +479,6 @@ private: // Default property extensions for derived classes virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const = 0; /** - * Notifies that a default property is being animated so the deriving class should update the cached value. - * @param[in] animation The animation animating the property. - * @param[in] index The index of the property. - * @param[in] value The value of the property after the animation. - */ - virtual void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ) - { } - - /** * @todo this is virtual so that for now actor can override it, * it needs to be removed and only have GetSceneObject but that requires changing actor and constraint logic * Retrieve the scene-graph object added by this object. diff --git a/dali/internal/event/render-tasks/render-task-impl.cpp b/dali/internal/event/render-tasks/render-task-impl.cpp index a97069b..04dfbb1 100644 --- a/dali/internal/event/render-tasks/render-task-impl.cpp +++ b/dali/internal/event/render-tasks/render-task-impl.cpp @@ -689,34 +689,6 @@ Property::Value RenderTask::GetDefaultPropertyCurrentValue( Property::Index inde return value; } -void RenderTask::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ) -{ - switch ( index ) - { - case Dali::RenderTask::Property::VIEWPORT_POSITION: - { - value.Get( mViewportPosition ); - break; - } - case Dali::RenderTask::Property::VIEWPORT_SIZE: - { - value.Get( mViewportSize ); - break; - } - case Dali::RenderTask::Property::CLEAR_COLOR: - { - value.Get( mClearColor ); - break; - } - case Dali::RenderTask::Property::REQUIRES_SYNC: - default: - { - // Nothing to do as not animatable - break; - } - } -} - const SceneGraph::PropertyOwner* RenderTask::GetSceneObject() const { return mSceneObject; diff --git a/dali/internal/event/render-tasks/render-task-impl.h b/dali/internal/event/render-tasks/render-task-impl.h index 90d5cc3..b76d0a2 100644 --- a/dali/internal/event/render-tasks/render-task-impl.h +++ b/dali/internal/event/render-tasks/render-task-impl.h @@ -323,11 +323,6 @@ public: // Implementation of Object virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const; /** - * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation() - */ - virtual void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value ); - - /** * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; diff --git a/dali/public-api/animation/animation.h b/dali/public-api/animation/animation.h index 29160c3..7480ff1 100644 --- a/dali/public-api/animation/animation.h +++ b/dali/public-api/animation/animation.h @@ -102,8 +102,6 @@ class Animation; * * Using AnimateTo and AnimateBy for the same property of the same Actor will yield undefined behaviour especially if the TimePeriod overlaps. * - * After calling Animation::Play(), Handle::GetProperty will return the target value of the animated property. - * * Signals * | %Signal Name | Method | * |--------------|--------------------------|