1 #ifndef __DALI_INTERNAL_RENDER_DEBUG_H__
2 #define __DALI_INTERNAL_RENDER_DEBUG_H__
5 * Copyright (c) 2015 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/internal/common/buffer-index.h>
24 // define this to print information about the items rendered each frame
25 #undef DALI_PRINT_RENDER_INFO
27 #ifdef DALI_PRINT_RENDER_INFO
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,index) Render::PrintRenderInstruction(x,index);
32 #define DALI_PRINT_RENDER_LIST(x) Render::PrintRenderList(x);
33 #define DALI_PRINT_RENDER_ITEM(x) Render::PrintRenderItem(x);
35 #else // DALI_PRINT_RENDER_INFO
37 #define DALI_PRINT_RENDER_START(x)
38 #define DALI_PRINT_RENDER_END()
39 #define DALI_PRINT_RENDER_INSTRUCTION(x,index)
40 #define DALI_PRINT_RENDER_LIST(x)
41 #define DALI_PRINT_RENDER_ITEM(x)
43 #endif // DALI_PRINT_RENDER_INFO
45 #undef DALI_PRINT_RENDERERS
47 // Turn this on to see a snapshot of # renderers every 2 seconds
48 //#define DALI_PRINT_RENDERERS 1
50 #ifdef DALI_PRINT_RENDERERS
51 #define DALI_PRINT_RENDERER_COUNT(x, y) Render::PrintRendererCount(x, y)
52 #else // DALI_PRINT_RENDERERS
53 #define DALI_PRINT_RENDERER_COUNT(x, y)
54 #endif // DALI_PRINT_RENDERERS
63 class PropertyInputImpl;
67 class RenderInstruction;
76 * Print a debug message at the start of the render-thread.
77 * @param[in] buffer The current render buffer index (previous update buffer)
79 void PrintFrameStart( BufferIndex bufferIndex );
82 * Print a debug message at the end of the render-thread.
87 * Print some information about a render-instruction.
88 * @param[in] instruction The render-instruction.
89 * @param[in] index to use
91 void PrintRenderInstruction( const SceneGraph::RenderInstruction& instruction, BufferIndex index );
94 * Print some information about a render-list.
95 * @param[in] instruction The render-list.
97 void PrintRenderList( const SceneGraph::RenderList& list );
100 * Print some information about a render-item.
101 * @param[in] instruction The render-item.
103 void PrintRenderItem( const SceneGraph::RenderItem& item );
106 * Print the number of image renderers
107 * @param[in] frameCount The frame counter
108 * @param[in] rendererCount The number of image renderers
110 void PrintRendererCount( unsigned int frameCount, unsigned int rendererCount );
118 #endif // __DALI_INTERNAL_RENDER_DEBUG_H__