(Vector) Support asynchronous file loading
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / vector-animation-thread.h
index 86fec43..b752105 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VECTOR_ANIMATION_THREAD_H
 
 /*
- * Copyright (c) 2021 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.
@@ -60,9 +60,11 @@ public:
 
   /**
    * @brief Called when the rasterization is completed from the rasterize thread.
-   * @param task The completed task
+   * @param[in] task The completed task
+   * @param[in] success true if the task succeeded, false otherwise.
+   * @param[in] keepAnimation true if the animation is running, false otherwise.
    */
-  void OnTaskCompleted(VectorAnimationTaskPtr task, bool stopped);
+  void OnTaskCompleted(VectorAnimationTaskPtr task, bool success, bool keepAnimation);
 
   /**
    * @brief Called when the sleep thread is awaken.
@@ -139,7 +141,7 @@ private:
     /**
      * @brief Sleeps untile the specified time point.
      */
-    void SleepUntil(std::chrono::time_point<std::chrono::system_clock> timeToSleepUntil);
+    void SleepUntil(std::chrono::time_point<std::chrono::steady_clock> timeToSleepUntil);
 
   protected:
     /**
@@ -154,7 +156,7 @@ private:
   private:
     ConditionalWait                                    mConditionalWait;
     std::unique_ptr<CallbackBase>                      mAwakeCallback;
-    std::chrono::time_point<std::chrono::system_clock> mSleepTimePoint;
+    std::chrono::time_point<std::chrono::steady_clock> mSleepTimePoint;
     const Dali::LogFactoryInterface&                   mLogFactory;
     bool                                               mNeedToSleep;
     bool                                               mDestroyThread;