Do not re-create SG::Animation when we call Clear to empty animation + Clear reset... 38/305938/8
authorEunki Hong <eunkiki.hong@samsung.com>
Wed, 14 Feb 2024 02:51:16 +0000 (11:51 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Fri, 16 Feb 2024 12:02:02 +0000 (12:02 +0000)
commit5faaa678b9aafcf0b79c65a2821461b2b13c3efc
tree0b102789c54952ca1e54cdf96a3952eb342e80f2
parent1ca8cb245d35e67c8fef00822f2cca380f147cac
Do not re-create SG::Animation when we call Clear to empty animation + Clear reset some values

Since we always destroy & create scene obeject whenever we call Clear(),
It will be make some useless memory increasement when user call
Clear() infinitely.

To avoid this cases, let we re-create that object only if we call Play() before
or at least 1 animator exist.

And also, make Clear() API reset some sensitive values, like CurrentLoop and State.

Change-Id: I7f79b5e8e2bf822f01f094e4023e90e5f0922faa
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali/utc-Dali-Animation.cpp
dali/internal/event/animation/animation-impl.cpp