(Vector) Fix some issues
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / vector-rasterize-thread.h
index ef262bd..f50a66d 100644 (file)
@@ -46,6 +46,8 @@ class VectorRasterizeThread : public Thread
 {
 public:
 
+  using UploadCompletedSignalType = Dali::VectorAnimationRenderer::UploadCompletedSignalType;
+
   /**
    * @brief Constructor.
    *
@@ -94,12 +96,6 @@ public:
   void RenderFrame();
 
   /**
-   * @brief This callback is called after the first frame is ready.
-   * @param[in] callback The resource ready callback
-   */
-  void SetResourceReadyCallback( EventThreadCallback* callback );
-
-  /**
    * @brief This callback is called after the animation is finished.
    * @param[in] callback The animation finished callback
    */
@@ -168,6 +164,12 @@ public:
    */
   void SetLoopingMode( DevelImageVisual::LoopingMode::Type loopingMode );
 
+  /**
+   * @brief Connect to this signal to be notified when the texture upload is completed.
+   * @return The signal to connect to.
+   */
+  UploadCompletedSignalType& UploadCompletedSignal();
+
 protected:
 
   /**
@@ -212,7 +214,6 @@ private:
   std::string                 mUrl;
   VectorAnimationRenderer     mVectorRenderer;
   ConditionalWait             mConditionalWait;
-  std::unique_ptr< EventThreadCallback > mResourceReadyTrigger;
   std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger;
   Vector2                     mPlayRange;
   PlayState                   mPlayState;
@@ -232,8 +233,10 @@ private:
   bool                        mDestroyThread;  ///< Whether the thread be destroyed
   bool                        mResourceReady;
   bool                        mCurrentFrameUpdated;
+  bool                        mCurrentLoopUpdated;
   bool                        mForward;
   bool                        mUpdateFrameNumber;
+  bool                        mNeedAnimationFinishedTrigger;
   const Dali::LogFactoryInterface& mLogFactory; ///< The log factory
 
 };