[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visual-factory / visual-factory.h
index 1d6be15..cc62c2b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -126,6 +126,24 @@ public:
    */
   bool GetPreMultiplyOnLoad() const;
 
+  /**
+   * @brief Discard visual base. It will keep reference of visual until idle callback called.
+   *
+   * @param[in] visual Discarded visual base.
+   */
+  void DiscardVisual(Visual::Base visual);
+
+  /**
+   * @brief Compile the visual shader in advance. Afterwards,
+   * when a visual using a new shader is requested, the pre-compiled shader is used.
+   *
+   * @note It is recommended that this method be called at the top of the application code.
+   * @note Using precompiled shaders is helpful when the application is complex and uses
+   * many different styles of visual options. On the other hand,if most visuals are the same
+   * and the application is simple, it may use memory unnecessarily or slow down the application launching speed.
+   */
+  void UsePreCompiledShader();
+
 private:
   explicit DALI_INTERNAL VisualFactory(Internal::VisualFactory* impl);
 };