/*
- * 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.
}
}
-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
#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
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
#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
{
// 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 );
}
}
- PERF_MONITOR_END(PerformanceMonitor::DRAW_NODES);
-
// check if anything has been posted to the update thread
bool updateRequired = !mImpl->resourcePostProcessQueue[ mImpl->renderBufferIndex ].empty();
DALI_PRINT_RENDER_END();
- DALI_PRINT_RENDERER_COUNT(mImpl->frameCount, mImpl->context.GetRendererCount());
- DALI_PRINT_CULL_COUNT(mImpl->frameCount, mImpl->context.GetCulledCount());
-
return updateRequired;
}
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 )
{
}
*/
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
/**
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
};
/**
* 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,