[dali_2.3.23] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / image-loader / texture-manager.h
index ce4bf3d..ff61916 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
 
 /*
- * Copyright (c) 2017 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.
 // EXTERNAL INCLUDES
 #include <dali/public-api/rendering/texture-set.h>
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
+
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 /**
  * API to interface with the toolkit texture manager
  * Allows developers to add Textures through TextureSets to toolkit so that visuals can use them to render
  */
 namespace TextureManager
 {
-
 /**
  * @brief Add a Texture to texture manager
  * Toolkit keeps the Texture handle until RemoveTexture is called.
  * @note this method does not check for duplicates,
  *       if same Texture is added multiple times, a different URL is returned each time
  * @param[in] texture the Texture to add
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
  * @return the Url string representing this texture
  */
-DALI_IMPORT_API std::string AddTexture( Texture& texture );
+DALI_TOOLKIT_API std::string AddTexture(Texture& texture, bool preMultiplied = false);
 
 /**
  * @brief Add a TextureSet to texture manager
@@ -49,9 +50,10 @@ DALI_IMPORT_API std::string AddTexture( Texture& texture );
  * @note this method does not check for duplicates,
  *       if same TextureSet is added multiple times, a different URL is returned each time
  * @param[in] textureSet the TextureSet to add
+ * @param[in] preMultiplied Whether this external texture preMultiplied or not. Default as false.
  * @return the Url string representing this texture
  */
-DALI_IMPORT_API std::string AddTexture( TextureSet& textureSet );
+DALI_TOOLKIT_API std::string AddTexture(TextureSet& textureSet, bool preMultiplied = false);
 
 /**
  * @brief Removes a TextureSet from toolkit
@@ -59,12 +61,12 @@ DALI_IMPORT_API std::string AddTexture( TextureSet& textureSet );
  * @param[in] textureUrl to remove
  * @return the handle to the TextureSet or empty handle in case TextureSet is not found
  */
-DALI_IMPORT_API TextureSet RemoveTexture( const std::string& textureUrl );
+DALI_TOOLKIT_API TextureSet RemoveTexture(const std::string& textureUrl);
 
-} // TextureManager
+} // namespace TextureManager
 
-} // Toolkit
+} // namespace Toolkit
 
-} // Dali
+} // namespace Dali
 
 #endif // DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H