[Tizen] Fixed Cache for AnimatedVectorImageVisual
[platform/core/uifw/dali-adaptor.git] / dali / internal / vector-animation / common / vector-animation-renderer-impl.h
old mode 100755 (executable)
new mode 100644 (file)
index ef588e1..27ed34f
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Internal
 {
-
 namespace Adaptor
 {
-
 class VectorAnimationRenderer;
-using VectorAnimationRendererPtr = IntrusivePtr< VectorAnimationRenderer >;
+using VectorAnimationRendererPtr = IntrusivePtr<VectorAnimationRenderer>;
 
 /**
  * Dali internal VectorAnimationRenderer.
@@ -43,7 +40,6 @@ using VectorAnimationRendererPtr = IntrusivePtr< VectorAnimationRenderer >;
 class VectorAnimationRenderer : public BaseObject, public ConnectionTracker
 {
 public:
-
   /**
    * @brief Creates a VectorAnimationRenderer object.
    *
@@ -52,24 +48,34 @@ public:
   static VectorAnimationRendererPtr New();
 
   /**
-   * @brief Initializes member data.
+   * @copydoc Dali::VectorAnimationRenderer::Finalize()
+   */
+  void Finalize();
+
+  /**
+   * @copydoc Dali::VectorAnimationRenderer::Load()
    */
-  void Initialize( const std::string& url );
+  bool Load(const std::string& url);
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::SetRenderer()
    */
-  void SetRenderer( Dali::Renderer renderer );
+  void SetRenderer(Dali::Renderer renderer);
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::SetSize()
    */
-  void SetSize( uint32_t width, uint32_t height );
+  void SetSize(uint32_t width, uint32_t height);
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::Render()
    */
-  bool Render( uint32_t frameNumber );
+  bool Render(uint32_t frameNumber);
+
+  /**
+   * @copydoc Dali::VectorAnimationRenderer::RenderStopped()
+   */
+  void RenderStopped();
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::GetTotalFrameNumber()
@@ -84,12 +90,29 @@ public:
   /**
    * @copydoc Dali::VectorAnimationRenderer::GetDefaultSize()
    */
-  void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+  void GetDefaultSize(uint32_t& width, uint32_t& height) const;
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::GetLayerInfo()
    */
-  void GetLayerInfo( Property::Map& map );
+  void GetLayerInfo(Property::Map& map) const;
+
+  /**
+   * @copydoc Dali::VectorAnimationRenderer::GetMarkerInfo()
+   */
+  bool GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const;
+
+  /**
+   * @copydoc Dali::VectorAnimationRenderer::InvalidateBuffer()
+   */
+  void InvalidateBuffer();
+
+  /**
+   * @copydoc Dali::VectorAnimationRenderer::AddPropertyValueCallback()
+   */
+  void AddPropertyValueCallback(const std::string& keyPath, Dali::VectorAnimationRenderer::VectorProperty property, CallbackBase* callback, int32_t id);
+
+  void KeepRasterizedBuffer();
 
   /**
    * @copydoc Dali::VectorAnimationRenderer::UploadCompletedSignal()
@@ -97,7 +120,6 @@ public:
   Dali::VectorAnimationRenderer::UploadCompletedSignalType& UploadCompletedSignal();
 
 private:
-
   /**
    * @brief Constructor
    */
@@ -109,12 +131,10 @@ private:
   ~VectorAnimationRenderer();
 
 private:
-
-  VectorAnimationRenderer( const VectorAnimationRenderer& ) = delete;
-  VectorAnimationRenderer& operator=( VectorAnimationRenderer& )  = delete;
+  VectorAnimationRenderer(const VectorAnimationRenderer&) = delete;
+  VectorAnimationRenderer& operator=(VectorAnimationRenderer&) = delete;
 
 private:
-
   VectorAnimationRendererPluginProxy mPlugin;
 };
 
@@ -122,22 +142,22 @@ private:
 
 } // namespace Internal
 
-inline static Internal::Adaptor::VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
+inline static Internal::Adaptor::VectorAnimationRenderer& GetImplementation(Dali::VectorAnimationRenderer& renderer)
 {
-  DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." );
+  DALI_ASSERT_ALWAYS(renderer && "VectorAnimationRenderer handle is empty.");
 
   BaseObject& handle = renderer.GetBaseObject();
 
-  return static_cast< Internal::Adaptor::VectorAnimationRenderer& >( handle );
+  return static_cast<Internal::Adaptor::VectorAnimationRenderer&>(handle);
 }
 
-inline static const Internal::Adaptor::VectorAnimationRenderer& GetImplementation( const Dali::VectorAnimationRenderer& renderer )
+inline static const Internal::Adaptor::VectorAnimationRenderer& GetImplementation(const Dali::VectorAnimationRenderer& renderer)
 {
-  DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." );
+  DALI_ASSERT_ALWAYS(renderer && "VectorAnimationRenderer handle is empty.");
 
   const BaseObject& handle = renderer.GetBaseObject();
 
-  return static_cast< const Internal::Adaptor::VectorAnimationRenderer& >( handle );
+  return static_cast<const Internal::Adaptor::VectorAnimationRenderer&>(handle);
 }
 
 } // namespace Dali