Cleanup, fix incorrect comment and removal of dead code related with old culling... 18/53518/5
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 7 Dec 2015 11:36:09 +0000 (11:36 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Mon, 7 Dec 2015 16:31:17 +0000 (16:31 +0000)
Change-Id: I9fb4807b6b09828ab78ceae0a706517a38d34f89

dali/internal/render/common/render-debug.cpp
dali/internal/render/common/render-debug.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/gl-resources/context.cpp
dali/internal/render/gl-resources/context.h
dali/internal/update/manager/process-render-tasks.cpp

index 9e43d44..e8c8dd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
@@ -141,16 +141,6 @@ void PrintRendererCount( unsigned int frameCount, unsigned int rendererCount )
   }
 }
 
-void PrintCullCount( unsigned int frameCount, unsigned int culledCount )
-{
-  if( frameCount % 120 == 30 ) // Print every 2 seconds reg
-  {
-    Debug::LogMessage( Debug::DebugInfo, "Renderer # Culled renderers: %u\n", culledCount );
-  }
-}
-
-
-
 } // Render
 
 } // Internal
index 59dbf66..3dc49fb 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_RENDER_DEBUG_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
 
 #undef DALI_PRINT_RENDERERS
 
-// Turn this on to see a snapshot of # renderers and # culled renderers every 2 seconds
+// 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)
-#define DALI_PRINT_CULL_COUNT(x, y)      Render::PrintCullCount(x, y)
 #else // DALI_PRINT_RENDERERS
 #define DALI_PRINT_RENDERER_COUNT(x, y)
-#define DALI_PRINT_CULL_COUNT(x, y)
 #endif // DALI_PRINT_RENDERERS
 
 
@@ -105,13 +103,6 @@ void PrintRenderList( const SceneGraph::RenderList& list );
 void PrintRenderItem( const SceneGraph::RenderItem& item );
 
 /**
- * Print the number of culled renderers
- * @param[in] frameCount The frame counter
- * @param[in] culledCount The number of culled renderers
- */
-void PrintCullCount( unsigned int frameCount, unsigned int culledCount );
-
-/**
  * Print the number of image renderers
  * @param[in] frameCount The frame counter
  * @param[in] rendererCount The number of image renderers
index e5a73fa..082d601 100644 (file)
 #include <dali/internal/render/renderers/render-sampler.h>
 #include <dali/internal/render/shaders/program-controller.h>
 
-// Uncomment the next line to enable frame snapshot logging
-//#define FRAME_SNAPSHOT_LOGGING
-
-#ifdef FRAME_SNAPSHOT_LOGGING
-
-
-namespace // unnamed namespace
-{
-unsigned int SNAPSHOT_FRAME_FREQUENCY = 1200; // dump every 20-30 seconds
-} // unnamed namespace
-
-#define SET_SNAPSHOT_FRAME_LOG_LEVEL \
-  DALI_LOG_FILTER_SET_LEVEL(Context::gGlLogFilter, ((GetFrameCount() % SNAPSHOT_FRAME_FREQUENCY)==5 ? Debug::General : Debug::Concise));
-
-#else // FRAME_SNAPSHOT_LOGGING
-
-#define SET_SNAPSHOT_FRAME_LOG_LEVEL
-
-#endif // FRAME_SNAPSHOT_LOGGING
-
 namespace Dali
 {
 
@@ -459,13 +439,6 @@ bool RenderManager::Render( Integration::RenderStatus& status )
 
   // Increment the frame count at the beginning of each frame
   ++(mImpl->frameCount);
-  mImpl->context.SetFrameCount(mImpl->frameCount);
-  mImpl->context.ClearRendererCount();
-  mImpl->context.ClearCulledCount();
-
-  PERF_MONITOR_START(PerformanceMonitor::DRAW_NODES);
-
-  SET_SNAPSHOT_FRAME_LOG_LEVEL;
 
   // Process messages queued during previous update
   mImpl->renderQueue.ProcessMessages( mImpl->renderBufferIndex );
@@ -527,8 +500,6 @@ bool RenderManager::Render( Integration::RenderStatus& status )
     }
   }
 
-  PERF_MONITOR_END(PerformanceMonitor::DRAW_NODES);
-
   // check if anything has been posted to the update thread
   bool updateRequired = !mImpl->resourcePostProcessQueue[ mImpl->renderBufferIndex ].empty();
 
@@ -547,9 +518,6 @@ bool RenderManager::Render( Integration::RenderStatus& status )
 
   DALI_PRINT_RENDER_END();
 
-  DALI_PRINT_RENDERER_COUNT(mImpl->frameCount, mImpl->context.GetRendererCount());
-  DALI_PRINT_CULL_COUNT(mImpl->frameCount, mImpl->context.GetCulledCount());
-
   return updateRequired;
 }
 
index c6ad6da..65f8cc6 100644 (file)
@@ -94,10 +94,7 @@ Context::Context(Integration::GlAbstraction& glAbstraction)
   mMaxTextureSize(0),
   mClearColor(Color::WHITE),    // initial color, never used until it's been set by the user
   mCullFaceMode( Dali::Material::NONE ),
-  mViewPort( 0, 0, 0, 0 ),
-  mFrameCount( 0 ),
-  mCulledCount( 0 ),
-  mRendererCount( 0 )
+  mViewPort( 0, 0, 0, 0 )
 {
 }
 
index e542f33..164364f 100644 (file)
@@ -1642,70 +1642,6 @@ public:
    */
   const Rect< int >& GetViewport();
 
-  /**
-   * Set the frame count of render thread
-   */
-  inline void SetFrameCount(unsigned int frameCount)
-  {
-    mFrameCount = frameCount;
-  }
-
-  /**
-   * Get the frame count
-   */
-  inline unsigned int GetFrameCount()
-  {
-    return mFrameCount;
-  }
-
-  /**
-   * Increment the count of culled renderers
-   */
-  inline void IncrementCulledCount()
-  {
-    mCulledCount++;
-  }
-
-  /**
-   * Clear the count of culled renderers
-   */
-  inline void ClearCulledCount()
-  {
-    mCulledCount = 0;
-  }
-
-  /**
-   * Get the count of culled renderers in this frame
-   */
-  inline unsigned int GetCulledCount()
-  {
-    return mCulledCount;
-  }
-
-  /**
-   * Increment the count of culled renderers
-   */
-  inline void IncrementRendererCount()
-  {
-    mRendererCount++;
-  }
-
-  /**
-   * Clear the count of image renderers
-   */
-  inline void ClearRendererCount()
-  {
-    mRendererCount = 0;
-  }
-
-  /**
-   * Get the count of image renderers in this frame
-   */
-  inline unsigned int GetRendererCount()
-  {
-    return mRendererCount;
-  }
-
 private: // Implementation
 
   /**
@@ -1798,9 +1734,6 @@ private: // Data
   bool mVertexAttributeCachedState[ MAX_ATTRIBUTE_CACHE_SIZE ];    ///< Value cache for Enable Vertex Attribute
   bool mVertexAttributeCurrentState[ MAX_ATTRIBUTE_CACHE_SIZE ];   ///< Current state on the driver for Enable Vertex Attribute
 
-  unsigned int mFrameCount;       ///< Number of render frames
-  unsigned int mCulledCount;      ///< Number of culled renderers per frame
-  unsigned int mRendererCount;    ///< Number of image renderers per frame
   FrameBufferStateCache mFrameBufferStateCache;   ///< frame buffer state cache
 };
 
index 47430f2..4c27d15 100644 (file)
@@ -95,8 +95,8 @@ Layer* FindLayer( Node& node )
 
 /**
  * Rebuild the Layer::colorRenderables, stencilRenderables and overlayRenderables members,
- * including only renderable-attachments which are included in the current render-task.
- * Returns true if all renderable attachments have finshed acquiring resources.
+ * including only renderers which are included in the current render-task.
+ * Returns true if all renderers have finshed acquiring resources.
  */
 bool AddRenderablesForTask( BufferIndex updateBufferIndex,
                             Node& node,