Revert "[3.0] Version downgrade (1.2.0 to 1.1.45)"
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-item.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_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 // INTERNAL INCLUDES
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/actors/layer.h>
24 #include <dali/public-api/math/matrix.h>
25 #include <dali/internal/update/nodes/node.h>
26
27 namespace Dali
28 {
29
30 namespace Internal
31 {
32
33 namespace Render
34 {
35 class Renderer;
36 class RenderGeometry;
37 }
38
39 namespace SceneGraph
40 {
41
42 /**
43  * A RenderItem contains all the data needed for rendering
44  */
45 struct RenderItem
46 {
47   /**
48    * Construct a new RenderItem
49    */
50   static RenderItem* New();
51
52   /**
53    * Non-virtual destructor; RenderItem is not suitable as a base class.
54    */
55   ~RenderItem();
56
57   /**
58    * Overriden delete operator.
59    * Deletes the RenderItem from its global memory pool
60    */
61   void operator delete( void* ptr );
62
63   Matrix            mModelMatrix;
64   Matrix            mModelViewMatrix;
65   Vector3           mSize;
66   Render::Renderer* mRenderer;
67   Node*             mNode;
68
69   mutable Render::Geometry* mBatchRenderGeometry;
70
71   int               mDepthIndex;
72   bool              mIsOpaque:1;
73   bool              mBatched:1;
74
75
76 private:
77
78   /**
79    * Private constructor. See RenderItem::New
80    */
81   RenderItem();
82
83   // RenderItems should not be copied as they are heavy
84   RenderItem( const RenderItem& item );
85   RenderItem& operator = ( const RenderItem& item );
86 };
87
88 } // namespace SceneGraph
89
90 } // namespace Internal
91
92 } // namespace Dali
93
94 #endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__