1 #ifndef DALI_RENDER_TASK_LIST_H
2 #define DALI_RENDER_TASK_LIST_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <cstdint> // uint32_t
25 #include <dali/public-api/object/base-handle.h>
30 * @addtogroup dali_core_rendering_effects
36 namespace Internal DALI_INTERNAL
42 * @brief An ordered list of Dali::RenderTask%s.
44 * These tasks describe how the Dali scene should be rendered; @see Dali::RenderTask for more details.
47 class DALI_CORE_API RenderTaskList : public BaseHandle
52 * @brief Creates an empty RenderTaskList handle.
54 * This can be initialised with Stage::GetRenderTaskList().
60 * @brief Downcasts a handle to RenderTaskList handle.
62 * If handle points to a RenderTaskList the downcast produces valid
63 * handle. If not, the returned handle is left uninitialized.
66 * @param[in] handle A handle to an object
67 * @return A handle to a RenderTaskList or an uninitialized handle
69 static RenderTaskList DownCast( BaseHandle handle );
74 * This is non-virtual since derived Handle types must not contain data or virtual methods.
80 * @brief This copy constructor is required for (smart) pointer semantics.
83 * @param [in] handle A reference to the copied handle
85 RenderTaskList(const RenderTaskList& handle);
88 * @brief This assignment operator is required for (smart) pointer semantics.
91 * @param [in] rhs A reference to the copied handle
92 * @return A reference to this
94 RenderTaskList& operator=(const RenderTaskList& rhs);
97 * @brief Move constructor.
100 * @param[in] rhs A reference to the moved handle
102 RenderTaskList( RenderTaskList&& rhs );
105 * @brief Move assignment operator.
108 * @param[in] rhs A reference to the moved handle
109 * @return A reference to this handle
111 RenderTaskList& operator=( RenderTaskList&& rhs );
114 * @brief Creates a new RenderTask.
116 * This will be appended to the list of render-tasks.
118 * @return A valid handle to a new RenderTask
120 RenderTask CreateTask();
123 * @brief Removes a RenderTask from the list of render-tasks.
125 * @param[in] task The render-task to remove.
127 void RemoveTask( RenderTask task );
130 * @brief Queries the number of render-tasks in the list.
132 * This is ordered i.e. the task with index 0 is the first to be processed each frame.
134 * @return The number of render-tasks
136 uint32_t GetTaskCount() const;
139 * @brief Retrieves a render-task.
142 * @param[in] index The index of the render task to retrieve
143 * @return A handle to the render-task
144 * @pre index should be in range i.e. less than GetTaskCount().
146 RenderTask GetTask( uint32_t index ) const;
148 public: // Not intended for application developers
152 * @brief This constructor is used by Dali New() methods.
155 * @param [in] renderTask A pointer to a newly allocated render-task
157 explicit DALI_INTERNAL RenderTaskList( Internal::RenderTaskList* renderTask );
166 #endif //DALI_RENDER_TASK_LIST_H