[4.0] (AnimatedVectorImageVisual) Use the content default size
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / vector-rasterize-thread.h
index afb71b3..c40e6e9 100644 (file)
@@ -154,6 +154,12 @@ public:
    */
   float GetCurrentProgress() const;
 
+  /**
+   * @brief Gets the default size of the file,.
+   * @return The default size of the file
+   */
+  void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+
 protected:
 
   /**
@@ -165,15 +171,9 @@ protected:
 private:
 
   /**
-   * @brief Called by the rasterize thread which ensures a wait if required.
-   * @return false if the thread should stop.
-   */
-  bool IsThreadReady();
-
-  /**
-   * @brief Start rendering
+   * @brief Initialize the vector renderer.
    */
-  bool StartRender();
+  void Initialize();
 
   /**
    * @brief Rasterize the current frame.
@@ -191,12 +191,13 @@ private:
   std::string                 mUrl;
   VectorAnimationRenderer     mVectorRenderer;
   ConditionalWait             mConditionalWait;
-  Dali::Mutex                 mMutex;
   std::unique_ptr< EventThreadCallback > mResourceReadyTrigger;
   std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger;
   Vector2                     mPlayRange;
   DevelImageVisual::PlayState mPlayState;
+  int64_t                     mFrameDurationNanoSeconds;
   float                       mProgress;
+  float                       mFrameRate;
   uint32_t                    mCurrentFrame;
   uint32_t                    mTotalFrame;
   uint32_t                    mStartFrame;
@@ -208,6 +209,7 @@ private:
   bool                        mNeedRender;
   bool                        mDestroyThread;  ///< Whether the thread be destroyed
   bool                        mResourceReady;
+  bool                        mCurrentFrameUpdated;
   const Dali::LogFactoryInterface& mLogFactory; ///< The log factory
 
 };