(VectorAnimationRenderer) Add SetSize method 56/193756/3
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 26 Nov 2018 06:09:06 +0000 (15:09 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 10 Dec 2018 06:11:25 +0000 (15:11 +0900)
Change-Id: Id654f7157043a6e62e0e407e6c183691db6e694d

dali/devel-api/adaptor-framework/native-image-source-queue.h
dali/devel-api/adaptor-framework/vector-animation-renderer-plugin.h
dali/devel-api/adaptor-framework/vector-animation-renderer.cpp
dali/devel-api/adaptor-framework/vector-animation-renderer.h
dali/internal/vector-animation/common/vector-animation-renderer-impl.cpp
dali/internal/vector-animation/common/vector-animation-renderer-impl.h
dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp
dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h

index a6fdf38fd705baba27fd9a941e0a27e2d673ef69..32b08c3ed1dc820573e348dae9fa9b34df0e7ab7 100755 (executable)
@@ -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
 {
index 316d0071f61c4e3d53286466dad95a36f6fe308d..bb4ef856703a1f287dc410276d6fbca25918b376 100644 (file)
@@ -55,6 +55,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.
    *
index 334974104ed15d8a5bed9a7b7457f32464926004..8daaba2d4f66eb96074b5923b490e7235db53e54 100755 (executable)
@@ -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();
index 644cf223fc35202fab2c4fd56f4646c07dcf9d78..f769073082d4783060e5f989f5e7fd8907e1f264 100755 (executable)
@@ -84,6 +84,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.
    *
index d037ab6df07bcca5c786aa8eea342ead1141467b..f2e46e30f3f6be70b2d6ed3132b060c16a9d99f6 100644 (file)
@@ -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();
index 0c54961dc0ddecc3fb83c721a7234dc755bc349c..5e8e80dba1468bdf9750c8659ef489f450e11df9 100755 (executable)
@@ -56,6 +56,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()
    */
index 8e7e1d2d14e2c91f59968057322cd1848e29dc03..b2134781487e22b08c45f6ccc1281be9ccb2344c 100644 (file)
@@ -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 )
index e3b6be38188fd99bcf870ad785b7f24cadd88883..2fc4e05f3d07d1d553e4dac931fd208be50a803e 100644 (file)
@@ -52,6 +52,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()
    */