1 #ifndef __DALI_RENDER_TASK_LIST_H__
2 #define __DALI_RENDER_TASK_LIST_H__
5 * Copyright (c) 2014 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 <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/object/base-handle.h>
25 namespace Dali DALI_IMPORT_API
30 namespace Internal DALI_INTERNAL
36 * @brief An ordered list of Dali::RenderTask%s.
38 * These tasks describe how the Dali scene should be rendered; @see Dali::RenderTask for more details.
40 class RenderTaskList : public BaseHandle
45 * @brief Create an empty RenderTaskList handle.
47 * This can be initialised with Stage::GetRenderTaskList().
52 * @brief Downcast a handle to RenderTaskList handle.
54 * If handle points to a RenderTaskList the downcast produces valid
55 * handle. If not the returned handle is left uninitialized.
57 * @param[in] handle A handle to an object.
58 * @return A handle to a RenderTaskList or an uninitialized handle.
60 static RenderTaskList DownCast( BaseHandle handle );
65 * This is non-virtual since derived Handle types must not contain data or virtual methods.
70 * @copydoc Dali::BaseHandle::operator=
72 using BaseHandle::operator=;
75 * @brief Create a new RenderTask.
77 * This will be appended to the list of render-tasks.
78 * @return A valid handle to a new RenderTask.
80 RenderTask CreateTask();
83 * @brief Remove a RenderTask from the list of render-tasks.
84 * @param[in] task The render-task to remove.
86 void RemoveTask( RenderTask task );
89 * @brief Query the number of render-tasks in the list.
91 * This is ordered i.e. the task with index 0 is the first to be processed each frame.
92 * @return The number of render-tasks.
94 unsigned int GetTaskCount() const;
97 * @brief Retrieve a render-task.
99 * @pre index should be in range i.e. less than GetTaskCount().
100 * @param[in] index The index of the render task to retrieve
101 * @return A handle to the render-task.
103 RenderTask GetTask( unsigned int index ) const;
105 public: // Not intended for application developers
108 * @brief This constructor is used by Dali New() methods
109 * @param [in] renderTask A pointer to a newly allocated render-task
111 explicit DALI_INTERNAL RenderTaskList( Internal::RenderTaskList* renderTask );
116 #endif //__DALI_RENDER_TASK_LIST_H__