License conversion from Flora to Apache 2.0
[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 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/internal/common/buffer-index.h>
23
24 // define this to print information about the items rendered each frame
25 #undef DALI_PRINT_RENDER_INFO
26
27 #ifdef DALI_PRINT_RENDER_INFO
28
29 #define DALI_PRINT_RENDER_START(x) Render::PrintFrameStart(x);
30 #define DALI_PRINT_RENDER_END() Render::PrintFrameEnd();
31 #define DALI_PRINT_RENDER_INSTRUCTION(x) Render::PrintRenderInstruction(x);
32 #define DALI_PRINT_RENDER_LIST(x) Render::PrintRenderList(x);
33 #define DALI_PRINT_RENDER_ITEM(x) Render::PrintRenderItem(x);
34
35 #else // DALI_PRINT_RENDER_INFO
36
37 #define DALI_PRINT_RENDER_START(x)
38 #define DALI_PRINT_RENDER_END()
39 #define DALI_PRINT_RENDER_INSTRUCTION(x)
40 #define DALI_PRINT_RENDER_LIST(x)
41 #define DALI_PRINT_RENDER_ITEM(x)
42
43 #endif // DALI_PRINT_RENDER_INFO
44
45 namespace Dali
46 {
47
48 namespace Internal
49 {
50
51 class PropertyInputImpl;
52
53 namespace SceneGraph
54 {
55 class RenderInstruction;
56 struct RenderList;
57 class RenderItem;
58 }
59
60 namespace Render
61 {
62
63 /**
64  * Print a debug message at the start of the render-thread.
65  * @param[in] buffer The current render buffer index (previous update buffer)
66  */
67 void PrintFrameStart( BufferIndex bufferIndex );
68
69 /**
70  * Print a debug message at the end of the render-thread.
71  */
72 void PrintFrameEnd();
73
74 /**
75  * Print some information about a render-instruction.
76  * @param[in] instruction The render-instruction.
77  */
78 void PrintRenderInstruction( const SceneGraph::RenderInstruction& instruction );
79
80 /**
81  * Print some information about a render-list.
82  * @param[in] instruction The render-list.
83  */
84 void PrintRenderList( const SceneGraph::RenderList& list );
85
86 /**
87  * Print some information about a render-item.
88  * @param[in] instruction The render-item.
89  */
90 void PrintRenderItem( const SceneGraph::RenderItem& item );
91
92 } // Render
93
94 } // Internal
95
96 } // Dali
97
98 #endif // __DALI_INTERNAL_RENDER_DEBUG_H__