Emscripten workarounds and llvm syntax fixes
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-debug.h
1 #ifndef __DALI_INTERNAL_RENDER_DEBUG_H__
2 #define __DALI_INTERNAL_RENDER_DEBUG_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // INTERNAL INCLUDES
21 #include <dali/internal/common/buffer-index.h>
22
23 // define this to print information about the items rendered each frame
24 #undef DALI_PRINT_RENDER_INFO
25
26 #ifdef DALI_PRINT_RENDER_INFO
27
28 #define DALI_PRINT_RENDER_START(x) Render::PrintFrameStart(x);
29 #define DALI_PRINT_RENDER_END() Render::PrintFrameEnd();
30 #define DALI_PRINT_RENDER_INSTRUCTION(x) Render::PrintRenderInstruction(x);
31 #define DALI_PRINT_RENDER_LIST(x) Render::PrintRenderList(x);
32 #define DALI_PRINT_RENDER_ITEM(x) Render::PrintRenderItem(x);
33
34 #else // DALI_PRINT_RENDER_INFO
35
36 #define DALI_PRINT_RENDER_START(x)
37 #define DALI_PRINT_RENDER_END()
38 #define DALI_PRINT_RENDER_INSTRUCTION(x)
39 #define DALI_PRINT_RENDER_LIST(x)
40 #define DALI_PRINT_RENDER_ITEM(x)
41
42 #endif // DALI_PRINT_RENDER_INFO
43
44 namespace Dali
45 {
46
47 namespace Internal
48 {
49
50 class PropertyInputImpl;
51
52 namespace SceneGraph
53 {
54 class RenderInstruction;
55 struct RenderList;
56 class RenderItem;
57 }
58
59 namespace Render
60 {
61
62 /**
63  * Print a debug message at the start of the render-thread.
64  * @param[in] buffer The current render buffer index (previous update buffer)
65  */
66 void PrintFrameStart( BufferIndex bufferIndex );
67
68 /**
69  * Print a debug message at the end of the render-thread.
70  */
71 void PrintFrameEnd();
72
73 /**
74  * Print some information about a render-instruction.
75  * @param[in] instruction The render-instruction.
76  */
77 void PrintRenderInstruction( const SceneGraph::RenderInstruction& instruction );
78
79 /**
80  * Print some information about a render-list.
81  * @param[in] instruction The render-list.
82  */
83 void PrintRenderList( const SceneGraph::RenderList& list );
84
85 /**
86  * Print some information about a render-item.
87  * @param[in] instruction The render-item.
88  */
89 void PrintRenderItem( const SceneGraph::RenderItem& item );
90
91 } // Render
92
93 } // Internal
94
95 } // Dali
96
97 #endif // __DALI_INTERNAL_RENDER_DEBUG_H__