From 8c8845e8856361cfdefce1c68fc544bdbbe8fa62 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 23 May 2024 13:53:40 +0900 Subject: [PATCH] Pint log if animation play / stop / pause / clear / destroy Let we know the animation's state by id, if user want to know. Change-Id: Ib3f51bd8035ae6958f37f2340b1dbbe10cfaf029 Signed-off-by: Eunki, Hong --- dali/internal/update/animation/scene-graph-animation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dali/internal/update/animation/scene-graph-animation.cpp b/dali/internal/update/animation/scene-graph-animation.cpp index 11b22af..2f7b159 100644 --- a/dali/internal/update/animation/scene-graph-animation.cpp +++ b/dali/internal/update/animation/scene-graph-animation.cpp @@ -22,6 +22,7 @@ #include // fmod // INTERNAL INCLUDES +#include #include #include #include @@ -229,6 +230,7 @@ void Animation::Pause() if(mState == Playing) { mState = Paused; + DALI_LOG_DEBUG_INFO("Animation[%u] with duration %f ms Pause\n", GetNotifyId(), mDurationSeconds * 1000.0f); } } @@ -251,6 +253,7 @@ void Animation::Bake(BufferIndex bufferIndex, EndAction action) void Animation::SetAnimatorsActive(bool active) { + DALI_LOG_DEBUG_INFO("Animation[%u] with duration %f ms %s\n", GetNotifyId(), mDurationSeconds * 1000.0f, active ? "Play" : "Stop"); for(auto&& item : mAnimators) { item->SetActive(active); @@ -269,6 +272,7 @@ bool Animation::Stop(BufferIndex bufferIndex) if(mEndAction != Dali::Animation::DISCARD) { Bake(bufferIndex, mEndAction); + DALI_LOG_DEBUG_INFO("Animation[%u] with duration %f ms Stop\n", GetNotifyId(), mDurationSeconds * 1000.0f); // Animators are automatically set to inactive in Bake } @@ -303,6 +307,8 @@ void Animation::ClearAnimator(BufferIndex bufferIndex) mIsStopped = false; ///< Do not make notify. mPlayedCount = 0; mCurrentLoop = 0; + + DALI_LOG_DEBUG_INFO("Animation[%u] with duration %f ms Clear\n", GetNotifyId(), mDurationSeconds * 1000.0f); } void Animation::OnDestroy(BufferIndex bufferIndex) @@ -323,6 +329,8 @@ void Animation::OnDestroy(BufferIndex bufferIndex) mIsStopped = false; ///< Do not make notify. mState = Destroyed; + + DALI_LOG_DEBUG_INFO("Animation[%u] with duration %f ms Destroy\n", GetNotifyId(), mDurationSeconds * 1000.0f); } void Animation::SetLoopingMode(bool loopingMode) -- 2.7.4