From 5cee47f6bd57dee04afab11a4f2d79e5480f163c Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 29 Nov 2022 20:13:32 +0900 Subject: [PATCH] (Vector) Add RenderStopped method Change-Id: I8cbf72b470445ed6d9cf91e050b2b1aed24a3122 --- .../tizen-vector-animation-renderer.cpp | 14 ++++++++++++++ .../tizen-vector-animation-renderer.h | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp index c32f81c..f0210c8 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp @@ -293,6 +293,20 @@ bool TizenVectorAnimationRenderer::Render(uint32_t frameNumber) return true; } +void TizenVectorAnimationRenderer::RenderStopped() +{ + if(mTargetSurface) + { + // Animation is stopped. Free empty buffers + mTargetSurface->FreeReleasedBuffers(); + + { + Dali::Mutex::ScopedLock lock(mMutex); + ResetBuffers(); + } + } +} + uint32_t TizenVectorAnimationRenderer::GetTotalFrameNumber() const { return mTotalFrameNumber; diff --git a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h index fbb0c6e..6f08892 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h @@ -77,6 +77,11 @@ public: bool Render(uint32_t frameNumber) override; /** + * @copydoc Dali::VectorAnimationRendererPlugin::RenderStopped() + */ + void RenderStopped() override; + + /** * @copydoc Dali::VectorAnimationRendererPlugin::GetTotalFrameNumber() */ uint32_t GetTotalFrameNumber() const override; -- 2.7.4