#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.
*/
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);
};