Merge "Blend Equation Advanced Supporting" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image-visual-shader-factory.h
1 #ifndef DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
2 #define DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_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
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
24 #include <string_view>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 namespace Internal
33 {
34
35 /**
36  * ImageVisualShaderFactory is an object that provides and shares shaders between image visuals
37  */
38 class ImageVisualShaderFactory
39 {
40 public:
41
42 public:
43
44   /**
45    * @brief Constructor
46    */
47   ImageVisualShaderFactory();
48
49   /**
50    * @brief Destructor
51    */
52   ~ImageVisualShaderFactory();
53
54   /**
55    * Get the standard image rendering shader.
56    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
57    * @param[in] atlasing Whether texture atlasing is applied.
58    * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied.
59    * @param[in] roundedCorner Whether the rounded corder is applied.
60    */
61   Shader GetShader( VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping, bool roundedCorner );
62
63   /**
64    * Request the default vertex shader source.
65    * @return The default vertex shader source.
66    */
67   std::string_view GetVertexShaderSource();
68
69   /**
70    * Request the default fragment shader source.
71    * @return The default fragment shader source.
72    */
73   std::string_view GetFragmentShaderSource();
74
75 protected:
76
77   /**
78    * Undefined copy constructor.
79    */
80   ImageVisualShaderFactory(const ImageVisualShaderFactory&);
81
82   /**
83    * Undefined assignment operator.
84    */
85   ImageVisualShaderFactory& operator=(const ImageVisualShaderFactory& rhs);
86
87 private:
88 };
89
90 } // namespace Internal
91
92 } // namespace Toolkit
93
94 } // namespace Dali
95
96 #endif // DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H