[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-debug.h
index 46ffdf1..6eae241 100644 (file)
@@ -1,21 +1,22 @@
-#ifndef __DALI_INTERNAL_RENDER_DEBUG_H__
-#define __DALI_INTERNAL_RENDER_DEBUG_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+#ifndef DALI_INTERNAL_RENDER_DEBUG_H
+#define DALI_INTERNAL_RENDER_DEBUG_H
+
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // INTERNAL INCLUDES
 #include <dali/internal/common/buffer-index.h>
@@ -27,7 +28,7 @@
 
 #define DALI_PRINT_RENDER_START(x) Render::PrintFrameStart(x);
 #define DALI_PRINT_RENDER_END() Render::PrintFrameEnd();
-#define DALI_PRINT_RENDER_INSTRUCTION(x) Render::PrintRenderInstruction(x);
+#define DALI_PRINT_RENDER_INSTRUCTION(x,index) Render::PrintRenderInstruction(x,index);
 #define DALI_PRINT_RENDER_LIST(x) Render::PrintRenderList(x);
 #define DALI_PRINT_RENDER_ITEM(x) Render::PrintRenderItem(x);
 
 
 #define DALI_PRINT_RENDER_START(x)
 #define DALI_PRINT_RENDER_END()
-#define DALI_PRINT_RENDER_INSTRUCTION(x)
+#define DALI_PRINT_RENDER_INSTRUCTION(x,index)
 #define DALI_PRINT_RENDER_LIST(x)
 #define DALI_PRINT_RENDER_ITEM(x)
 
 #endif // DALI_PRINT_RENDER_INFO
 
+#undef DALI_PRINT_RENDERERS
+
+// Turn this on to see a snapshot of # renderers every 2 seconds
+//#define DALI_PRINT_RENDERERS 1
+
+#ifdef DALI_PRINT_RENDERERS
+#define DALI_PRINT_RENDERER_COUNT(x, y)  Render::PrintRendererCount(x, y)
+#else // DALI_PRINT_RENDERERS
+#define DALI_PRINT_RENDERER_COUNT(x, y)
+#endif // DALI_PRINT_RENDERERS
+
+
 namespace Dali
 {
 
@@ -51,9 +64,10 @@ class PropertyInputImpl;
 
 namespace SceneGraph
 {
+class Node;
 class RenderInstruction;
-class RenderList;
-class RenderItem;
+struct RenderList;
+struct RenderItem;
 }
 
 namespace Render
@@ -73,8 +87,9 @@ void PrintFrameEnd();
 /**
  * Print some information about a render-instruction.
  * @param[in] instruction The render-instruction.
+ * @param[in] index to use
  */
-void PrintRenderInstruction( const SceneGraph::RenderInstruction& instruction );
+void PrintRenderInstruction( const SceneGraph::RenderInstruction& instruction, BufferIndex index );
 
 /**
  * Print some information about a render-list.
@@ -88,10 +103,24 @@ void PrintRenderList( const SceneGraph::RenderList& list );
  */
 void PrintRenderItem( const SceneGraph::RenderItem& item );
 
+/**
+ * Print the number of image renderers
+ * @param[in] frameCount The frame counter
+ * @param[in] rendererCount The number of image renderers
+ */
+void PrintRendererCount( unsigned int frameCount, unsigned int rendererCount );
+
+/**
+ * Recursively dumps a Node tree.
+ * @param[in] node The starting node to dump from
+ * @param[in] indent Optional. Leave unset for default indent (used internally while recursing)
+ */
+void DumpNode( const SceneGraph::Node* node, unsigned int indent = 0 );
+
 } // Render
 
 } // Internal
 
 } // Dali
 
-#endif // __DALI_INTERNAL_RENDER_DEBUG_H__
+#endif // DALI_INTERNAL_RENDER_DEBUG_H