X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fanimation%2Fscene-graph-animation.cpp;h=aa01b10bd59a57363d0bd6d5c8fc6b629218cf73;hp=3a95d545c9dca42141f21eacb8f680e3a6b6f105;hb=ee9d14cd99ad293d46b17dc2f3591cc061ec403c;hpb=53f9fe2ef16f8124ab976c9995146a0fd342775e diff --git a/dali/internal/update/animation/scene-graph-animation.cpp b/dali/internal/update/animation/scene-graph-animation.cpp index 3a95d54..aa01b10 100644 --- a/dali/internal/update/animation/scene-graph-animation.cpp +++ b/dali/internal/update/animation/scene-graph-animation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -78,7 +78,8 @@ Animation::Animation( float durationSeconds, float speedFactor, const Vector2& p mDisconnectAction(disconnectAction), mState(Stopped), mProgressReachedSignalRequired( false ), - mAutoReverseEnabled( false ) + mAutoReverseEnabled( false ), + mIsActive{ false } { } @@ -424,6 +425,8 @@ void Animation::Update( BufferIndex bufferIndex, float elapsedSeconds, bool& loo void Animation::UpdateAnimators( BufferIndex bufferIndex, bool bake, bool animationFinished ) { + mIsActive[bufferIndex] = false; + const Vector2 playRange( mPlayRange * mDurationSeconds ); float elapsedSecondsClamped = Clamp( mElapsedSeconds, playRange.x, playRange.y ); @@ -454,6 +457,11 @@ void Animation::UpdateAnimators( BufferIndex bufferIndex, bool bake, bool animat progress = Clamp((elapsedSecondsClamped - intervalDelay) / animatorDuration, 0.0f , 1.0f ); } animator->Update(bufferIndex, progress, bake); + + if (animatorDuration > 0.0f && (elapsedSecondsClamped - intervalDelay) <= animatorDuration) + { + mIsActive[bufferIndex] = true; + } } applied = true; }