[Tizen] Do not re-create SG::Animation when we call Clear to empty animation + Clear... 04/306104/2
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 07:24:33 +0000 (16:24 +0900)
commit7be9a70a596ab9dc4a3aeb384753e076521cc70c
treef4e04e6025271d56c8d9f5c84f52a0f53614cacf
parent0487945c3aec0cee3528276c35f284d7a19c47d3
[Tizen] 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