From f6059c77a8d2119eb22db398f9dfe2000f4d4c8c Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 26 Nov 2018 15:09:06 +0900 Subject: [PATCH] (VectorAnimationRenderer) Add SetSize method Change-Id: Id654f7157043a6e62e0e407e6c183691db6e694d --- dali/devel-api/adaptor-framework/native-image-source-queue.h | 4 +++- .../adaptor-framework/vector-animation-renderer-plugin.h | 8 ++++++++ dali/devel-api/adaptor-framework/vector-animation-renderer.cpp | 5 +++++ dali/devel-api/adaptor-framework/vector-animation-renderer.h | 8 ++++++++ .../vector-animation/common/vector-animation-renderer-impl.cpp | 5 +++++ .../vector-animation/common/vector-animation-renderer-impl.h | 5 +++++ .../common/vector-animation-renderer-plugin-proxy.cpp | 8 ++++++++ .../common/vector-animation-renderer-plugin-proxy.h | 5 +++++ 8 files changed, 47 insertions(+), 1 deletion(-) diff --git a/dali/devel-api/adaptor-framework/native-image-source-queue.h b/dali/devel-api/adaptor-framework/native-image-source-queue.h index a6fdf38..32b08c3 100755 --- a/dali/devel-api/adaptor-framework/native-image-source-queue.h +++ b/dali/devel-api/adaptor-framework/native-image-source-queue.h @@ -51,8 +51,10 @@ typedef Dali::IntrusivePtr< Dali::NativeImageSourceQueue > NativeImageSourceQueu /** * @brief Used for displaying native images. * - * NativeImageSource can be created internally or externally by native image source. * NativeImage is a platform specific way of providing pixel data to the GPU for rendering,for example via an EGL image. + * NativeImageSourceQueue can be created internally or externally by native image source. + * It has a queue which handles some image buffers. + * Someone should fill the buffers and enqueue them, then DALi will show them. */ class DALI_ADAPTOR_API NativeImageSourceQueue : public NativeImageInterface { diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h b/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h index 316d007..bb4ef85 100644 --- a/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h @@ -56,6 +56,14 @@ public: virtual bool CreateRenderer( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) = 0; /** + * @brief Sets the target image size. + * + * @param[in] width The target image width + * @param[in] height The target image height + */ + virtual void SetSize( uint32_t width, uint32_t height ) = 0; + + /** * @brief Starts the rendering. * * @return True if the renderer is successfully started, false otherwise diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp index 3349741..8daaba2 100755 --- a/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp @@ -59,6 +59,11 @@ VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimati return *this; } +void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) +{ + GetImplementation( *this ).SetSize( width, height ); +} + bool VectorAnimationRenderer::StartRender() { return GetImplementation( *this ).StartRender(); diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer.h b/dali/devel-api/adaptor-framework/vector-animation-renderer.h index 644cf22..f769073 100755 --- a/dali/devel-api/adaptor-framework/vector-animation-renderer.h +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer.h @@ -85,6 +85,14 @@ public: VectorAnimationRenderer& operator=( const VectorAnimationRenderer& rhs ); /** + * @brief Sets the target image size. + * + * @param[in] width The target image width + * @param[in] height The target image height + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @brief Starts the rendering. * * @return True if the renderer is successfully started, false otherwise. diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp b/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp index d037ab6..f2e46e3 100644 --- a/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp +++ b/dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp @@ -65,6 +65,11 @@ void VectorAnimationRenderer::Initialize( const std::string& url, Dali::Renderer mPlugin.CreateRenderer( url, renderer, width, height ); } +void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) +{ + mPlugin.SetSize( width, height ); +} + bool VectorAnimationRenderer::StartRender() { return mPlugin.StartRender(); diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-impl.h b/dali/internal/vector-animation/common/vector-animation-renderer-impl.h index 0c54961..5e8e80d 100755 --- a/dali/internal/vector-animation/common/vector-animation-renderer-impl.h +++ b/dali/internal/vector-animation/common/vector-animation-renderer-impl.h @@ -57,6 +57,11 @@ public: void Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); /** + * @copydoc Dali::VectorAnimationRenderer::SetSize() + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @copydoc Dali::VectorAnimationRenderer::StartRender() */ bool StartRender(); diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp index 8e7e1d2..b213478 100644 --- a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp +++ b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp @@ -109,6 +109,14 @@ bool VectorAnimationRendererPluginProxy::CreateRenderer( const std::string& url, return false; } +void VectorAnimationRendererPluginProxy::SetSize( uint32_t width, uint32_t height ) +{ + if( mPlugin ) + { + mPlugin->SetSize( width, height ); + } +} + bool VectorAnimationRendererPluginProxy::StartRender() { if( mPlugin ) diff --git a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h index e3b6be3..2fc4e05 100644 --- a/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h +++ b/dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h @@ -53,6 +53,11 @@ public: bool CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); /** + * @copydoc Dali::VectorAnimationRendererPlugin::SetSize() + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @copydoc Dali::VectorAnimationRendererPlugin::StartRender() */ bool StartRender(); -- 2.7.4