Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.git] / dali / internal / update / controllers / scene-controller.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_SCENE_CONTROLLER_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_SCENE_CONTROLLER_H__
3
4 /*
5  * Copyright (c) 2014 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 namespace Dali
22 {
23
24 namespace Internal
25 {
26 class CompleteStatusManager;
27
28 namespace SceneGraph
29 {
30
31 class CameraController;
32 class RenderMessageDispatcher;
33 class RenderQueue;
34 class DiscardQueue;
35 class TextureCache;
36 class ImageRenderer;
37 class NodeDataProvider;
38
39 /**
40  * Abstract interface for the scene controller
41  */
42 class SceneController
43 {
44 public:
45
46   /**
47    * Constructor
48    */
49   SceneController()
50   {
51   }
52
53   /**
54    * Destructor
55    */
56   virtual ~SceneController()
57   {
58   }
59
60   /**
61    * Get a reusable renderer from the pool
62    * @param[in] dataProvider The node using this renderer
63    * @return The renderer
64    */
65   virtual ImageRenderer* NewImageRenderer( NodeDataProvider& dataProvider ) = 0;
66
67   /**
68    * Return reusable renderer to the pool
69    * @param[in] The renderer
70    */
71   virtual void FreeImageRenderer( ImageRenderer& renderer ) = 0;
72
73   /**
74    * Return the render message dispatcher
75    * @return A reference to the render message dispatcher
76    */
77   virtual RenderMessageDispatcher& GetRenderMessageDispatcher() = 0;
78
79   /**
80    * Return the render queue
81    * @return A reference to the render queue
82    */
83   virtual RenderQueue& GetRenderQueue() = 0;
84
85   /**
86    * Return the discard queue
87    * @return A reference to the discard queue
88    */
89   virtual DiscardQueue& GetDiscardQueue() = 0;
90
91   /**
92    * Return the texture cache
93    * TODO: Remove this method when renderer's & shader's second stage initialization
94    * is done by RenderManager rather than by the attachments in the Update thread.
95    * DO NOT USE THIS IN THE UPDATE THREAD!
96    * @return A reference to the texture cache
97    */
98   virtual TextureCache& GetTextureCache() = 0;
99
100   /**
101    * Return the CompleteStatusManager
102    * @return a reference to the complete status manager
103    */
104   virtual CompleteStatusManager& GetCompleteStatusManager() = 0;
105
106 private:
107
108   // Undefined copy constructor.
109   SceneController( const SceneController& );
110
111   // Undefined assignment operator.
112   SceneController& operator=( const SceneController& );
113 };
114
115 } // namespace SceneGraph
116
117 } // namespace Internal
118
119 } // namespace Dali
120
121 #endif // __DALI_INTERNAL_SCENE_GRAPH_SCENE_CONTROLLER_H__