(Vector) Fix occasional tc failure
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / animated-vector-image-visual.h
index 0270268..221cf23 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_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.
@@ -93,6 +93,11 @@ public: // from Visual
    */
   void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
+  /**
+   * @copydoc Visual::Base::EnablePreMultipliedAlpha
+   */
+  void EnablePreMultipliedAlpha(bool preMultiplied) override;
+
 protected: // From VectorAnimationManager::LifecycleObserver:
   /**
    * @copydoc VectorAnimationManager::LifecycleObserver::VectorAnimationManagerDestroyed()
@@ -140,6 +145,16 @@ protected:
   void OnSetTransform() override;
 
   /**
+   * @copydoc Visual::Base::UpdateShader
+   */
+  void UpdateShader() override;
+
+  /**
+   * @copydoc Visual::Base::GenerateShader
+   */
+  Shader GenerateShader() const override;
+
+  /**
    * @copydoc Visual::Base::OnDoAction
    */
   void OnDoAction(const Property::Index actionId, const Property::Value& attributes) override;
@@ -153,9 +168,10 @@ private:
   void DoSetProperty(Property::Index index, const Property::Value& value);
 
   /**
-   * @brief Called when the texture upload is completed.
+   * @brief Called when the resource is ready.
+   * @param[in] status The resource status
    */
-  void OnUploadCompleted();
+  void OnResourceReady(VectorAnimationTask::ResourceStatus status);
 
   /**
    * @brief Event callback from rasterize thread. This is called after the animation is finished.
@@ -225,6 +241,7 @@ private:
   WeakHandle<Actor>                  mPlacementActor;
   DevelImageVisual::PlayState::Type  mPlayState;
   CallbackBase*                      mEventCallback; // Not owned
+  bool                               mLoadFailed;
   bool                               mRendererAdded;
   bool                               mCoreShutdown;
   bool                               mRedrawInScalingDown;