(Vector) Let we send finished signal only for matched sent play/stop from visual
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / animated-vector-image-visual.h
index b0a7569..fc7d7a4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -182,8 +182,10 @@ private:
 
   /**
    * @brief Event callback from rasterize thread. This is called after the animation is finished.
+   *
+   * @param[in] playStateId The play state id
    */
-  void OnAnimationFinished();
+  void OnAnimationFinished(uint32_t playStateId);
 
   /**
    * @brief Send animation data to the rasterize thread.
@@ -237,7 +239,7 @@ private:
   AnimatedVectorImageVisual& operator=(const AnimatedVectorImageVisual& visual) = delete;
 
 private:
-  VisualUrl                          mUrl;
+  VisualUrl                          mImageUrl;
   VectorAnimationTask::AnimationData mAnimationData;
   VectorAnimationTaskPtr             mVectorAnimationTask;
   ImageVisualShaderFactory&          mImageVisualShaderFactory;
@@ -249,10 +251,15 @@ private:
   WeakHandle<Actor>                  mPlacementActor;
   DevelImageVisual::PlayState::Type  mPlayState;
   CallbackBase*                      mEventCallback; // Not owned
-  bool                               mLoadFailed;
-  bool                               mRendererAdded;
-  bool                               mCoreShutdown;
-  bool                               mRedrawInScalingDown;
+
+  uint32_t mLastSentPlayStateId;
+
+  bool mLoadFailed : 1;
+  bool mRendererAdded : 1;
+  bool mCoreShutdown : 1;
+  bool mRedrawInScalingDown : 1;
+  bool mEnableFrameCache : 1;
+  bool mUseNativeImage : 1;
 };
 
 } // namespace Internal