(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 a6fdf38..32b08c3 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 316d007..bb4ef85 100644 (file)
@@ -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
index 3349741..8daaba2 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 644cf22..f769073 100755 (executable)
@@ -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.
index d037ab6..f2e46e3 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 0c54961..5e8e80d 100755 (executable)
@@ -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();
index 8e7e1d2..b213478 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 e3b6be3..2fc4e05 100644 (file)
@@ -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();