[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / animated-vector-image-visual.h
index e013d6c..fe3396a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2023 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.
@@ -53,7 +53,7 @@ using AnimatedVectorImageVisualPtr = IntrusivePtr<AnimatedVectorImageVisual>;
  * | url                      | STRING           |
  *
  */
-class AnimatedVectorImageVisual : public Visual::Base, public ConnectionTracker, public VectorAnimationManager::LifecycleObserver
+class AnimatedVectorImageVisual : public Visual::Base, public ConnectionTracker
 {
 public:
   /**
@@ -99,12 +99,6 @@ public: // from Visual
    */
   void EnablePreMultipliedAlpha(bool preMultiplied) override;
 
-protected: // From VectorAnimationManager::LifecycleObserver:
-  /**
-   * @copydoc VectorAnimationManager::LifecycleObserver::VectorAnimationManagerDestroyed()
-   */
-  void VectorAnimationManagerDestroyed() override;
-
 protected:
   /**
    * @brief Constructor.
@@ -182,8 +176,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.
@@ -218,7 +214,7 @@ private:
   /**
    * @brief Callback when the visibility of the actor is changed.
    */
-  void OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type);
+  void OnControlInheritedVisibilityChanged(Actor actor, bool visible);
 
   /**
    * @brief Callback when the visibility of the window is changed.
@@ -237,6 +233,7 @@ private:
   AnimatedVectorImageVisual& operator=(const AnimatedVectorImageVisual& visual) = delete;
 
 private:
+  WeakHandle<Window>                 mPlacementWindow;
   VisualUrl                          mImageUrl;
   VectorAnimationTask::AnimationData mAnimationData;
   VectorAnimationTaskPtr             mVectorAnimationTask;
@@ -249,10 +246,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 mRedrawInScalingDown : 1;
+  bool mEnableFrameCache : 1;
+  bool mUseNativeImage : 1;
+  bool mNotifyAfterRasterization : 1;
 };
 
 } // namespace Internal