Move MultiplyColorByAlpha() from main thread to resource thread
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / image-loader / texture-manager.h
1 #ifndef DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
2 #define DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 // EXTERNAL INCLUDES
21 #include <dali/public-api/rendering/texture-set.h>
22
23 // INTERNAL INCLUDES
24 #include <dali-toolkit/public-api/dali-toolkit-common.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 /**
33  * API to interface with the toolkit texture manager
34  * Allows developers to add Textures through TextureSets to toolkit so that visuals can use them to render
35  */
36 namespace TextureManager
37 {
38
39 /**
40  * @brief Add a Texture to texture manager
41  * Toolkit keeps the Texture handle until RemoveTexture is called.
42  * @note this method does not check for duplicates,
43  *       if same Texture is added multiple times, a different URL is returned each time
44  * @param[in] texture the Texture to add
45  * @return the Url string representing this texture
46  */
47 DALI_TOOLKIT_API std::string AddTexture( Texture& texture );
48
49 /**
50  * @brief Add a TextureSet to texture manager
51  * Toolkit keeps the TextureSet handle until RemoveTexture is called.
52  * @note this method does not check for duplicates,
53  *       if same TextureSet is added multiple times, a different URL is returned each time
54  * @param[in] textureSet the TextureSet to add
55  * @return the Url string representing this texture
56  */
57 DALI_TOOLKIT_API std::string AddTexture( TextureSet& textureSet );
58
59 /**
60  * @brief Removes a TextureSet from toolkit
61  * @note TextureSet may still be used by visuals and kept alive by them
62  * @param[in] textureUrl to remove
63  * @return the handle to the TextureSet or empty handle in case TextureSet is not found
64  */
65 DALI_TOOLKIT_API TextureSet RemoveTexture( const std::string& textureUrl );
66
67 } // TextureManager
68
69 } // Toolkit
70
71 } // Dali
72
73 #endif // DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H