From d652609dc8339aece1b8dc08e93a81a102b202ea Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 7 Nov 2023 20:15:26 +0900 Subject: [PATCH] (AnimatedVector) Make API to get marker information Change-Id: I2ed04426323701c96ca4915f016336d67f67fc69 Signed-off-by: Eunki, Hong --- .../tizen-vector-animation-renderer.cpp | 17 +++++++++++++++++ .../tizen-vector-animation-renderer.h | 9 +++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) 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 bec6d14..810709a 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp @@ -390,6 +390,23 @@ bool TizenVectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint return false; } +void TizenVectorAnimationRenderer::GetMarkerInfo(Property::Map& map) const +{ + Dali::Mutex::ScopedLock lock(mMutex); + + if(mVectorRenderer) + { + auto markerList = mVectorRenderer->markers(); + for(auto&& iter : markerList) + { + Property::Array frames; + frames.PushBack(std::get<1>(iter)); + frames.PushBack(std::get<2>(iter)); + map.Add(std::get<0>(iter), frames); + } + } +} + void TizenVectorAnimationRenderer::InvalidateBuffer() { Dali::Mutex::ScopedLock lock(mMutex); 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 ae7c415..9341d97 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h @@ -112,6 +112,11 @@ public: bool GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const override; /** + * @copydoc Dali::VectorAnimationRendererPlugin::GetMarkerInfo() + */ + void GetMarkerInfo(Property::Map& map) const override; + + /** * @copydoc Dali::VectorAnimationRendererPlugin::InvalidateBuffer() */ void InvalidateBuffer() override; @@ -146,8 +151,8 @@ private: private: using SurfacePair = std::pair; - std::string mUrl; ///< The content file path - std::vector mBuffers; ///< EGL Image vector + std::string mUrl; ///< The content file path + std::vector mBuffers; ///< EGL Image vector std::vector> mPropertyCallbacks; ///< Property callback list mutable Dali::Mutex mMutex; ///< Mutex -- 2.7.4