22152e3d4d69d03f41880c71f5b287a7cf723edb
[platform/core/uifw/dali-core.git] / dali / graphics-api / graphics-render-pass-create-info.h
1 #ifndef DALI_GRAPHICS_RENDERPASS_CREATE_INFO_H
2 #define DALI_GRAPHICS_RENDERPASS_CREATE_INFO_H
3
4 /*
5  * Copyright (c) 2021 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
21 // EXTERNAL INCLUDES
22 #include <memory>
23
24 // INTERNAL INCLUDES
25 #include "graphics-render-pass.h"
26 #include "graphics-types.h"
27
28 namespace Dali
29 {
30 namespace Graphics
31 {
32 class RenderTarget;
33 /**
34  * @brief Interface class for RenderPassCreateInfo types in the graphics API.
35  *
36  * This class describes RenderPass properties (TBD)
37  */
38 struct RenderPassCreateInfo
39 {
40   /**
41    * @brief Sets pointer to the extension
42    *
43    * The pointer to the extension must be set either to nullptr
44    * or to the valid structure. The structures may create
45    * a chain. The last structure in a chain must point at
46    * nullptr.
47    *
48    * @param[in] value pointer to the valid extension structure
49    * @return reference to this structure
50    */
51   auto& SetNextExtension(ExtensionCreateInfo* value)
52   {
53     nextExtension = value;
54     return *this;
55   }
56
57   /**
58    * @brief Binds render target to render pass
59    *
60    * @param[in] value valid RenderTarget object
61    * @return reference to this structure
62    */
63   auto& SetRenderTarget(RenderTarget* value)
64   {
65     renderTarget = value;
66     return *this;
67   }
68
69   /**
70    * @brief Sets allocation callbacks which will be used when object is created
71    * and destroyed.
72    *
73    * @param[in] value Valid reference to AllocationCallbacksStructure
74    * @return reference to this structure
75    */
76   auto& SetAllocationCallbacks(const AllocationCallbacks& value)
77   {
78     allocationCallbacks = &value;
79     return *this;
80   }
81
82   GraphicsStructureType type{GraphicsStructureType::RENDERPASS_CREATE_INFO_STRUCT};
83   ExtensionCreateInfo*  nextExtension{nullptr};
84   RenderTarget*         renderTarget{nullptr};
85
86   const AllocationCallbacks* allocationCallbacks{nullptr};
87 };
88
89 } // namespace Graphics
90 } // namespace Dali
91
92 #endif // DALI_GRAPHICS_FRAMEBUFFER_FACTORY_H