Let we print the trace log only for end.
Change-Id: I8acbce1bcc723ecb91b8df40c25bd62a8a66eeb2
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
uint32_t renderCallCount = 0u;
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_LIST_PROCESS", [&](std::ostringstream& oss) {
- oss << "[" << count << "]";
- });
// Loop through all RenderItems in the RenderList, set up any prerequisites to render them, then perform the render.
for(uint32_t index = 0u; index < count; ++index)
{
}
}
}
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_LIST_PROCESS", [&](std::ostringstream& oss) {
- oss << "[renderCallCount:" << renderCallCount << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_LIST_PROCESS [%u]\n", renderCallCount);
+ }
+#endif
}
RenderAlgorithms::RenderAlgorithms(Graphics::Controller& graphicsController)
int orientation,
const Uint16Pair& sceneSize)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_INSTRUCTION_PROCESS", [&](std::ostringstream& oss) {
- oss << "[" << instruction.RenderListCount() << "]";
- });
DALI_PRINT_RENDER_INSTRUCTION(instruction, bufferIndex);
const Matrix* viewMatrix = instruction.GetViewMatrix(bufferIndex);
mGraphicsCommandBuffer->ExecuteCommandBuffers(std::move(buffers));
}
}
- DALI_TRACE_END(gTraceFilter, "DALI_RENDER_INSTRUCTION_PROCESS");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_INSTRUCTION_PROCESS\n");
+ }
+#endif
}
} // namespace Render
void RenderManager::PreRender(Integration::RenderStatus& status, bool forceClear)
{
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_RENDER_PRE_RENDER");
-
DALI_PRINT_RENDER_START(mImpl->renderBufferIndex);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "\n\nNewFrame %d\n", mImpl->frameCount);
mImpl->commandBufferSubmitted = false;
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_PRE_RENDER", [&](std::ostringstream& oss) {
- oss << "[" << totalInstructionCount << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_PRE_RENDER [%u]\n", totalInstructionCount);
+ }
+#endif
}
void RenderManager::PreRender(Integration::Scene& scene, std::vector<Rect<int>>& damagedRects)
return;
}
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_DIRTY_RECT", [&](std::ostringstream& oss) {
- oss << "[" << itemsDirtyRects.size() << "]";
- });
-
uint32_t renderItemCount = 0u;
// Mark previous dirty rects in the std::unordered_map.
{
damagedRectCleaner.SetCleanOnReturn(false);
}
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_DIRTY_RECT", [&](std::ostringstream& oss) {
+
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ std::ostringstream oss;
oss << "[" << itemsDirtyRects.size() << ",";
oss << "itemCount:" << renderItemCount << ",";
oss << "damagedRects:" << damagedRects.size() << "]";
- });
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_DIRTY_RECT [%s]\n", oss.str().c_str());
+ }
+#endif
}
void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo)
clippingRect = Rect<int>();
}
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_RENDER_UBO");
// Prefetch programs before we start rendering so reflection is
// ready, and we can pull exact size of UBO needed (no need to resize during drawing)
auto totalSizeCPU = 0u;
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "GPU buffer: nil\n");
}
#endif
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_UBO", [&](std::ostringstream& oss) {
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ std::ostringstream oss;
oss << "[cpuMemory:" << totalSizeCPU << ",";
oss << "gpuMemory:" << totalSizeGPU << "]";
- });
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_UBO [%s]\n", oss.str().c_str());
+ }
+#endif
for(uint32_t i = 0; i < instructionCount; ++i)
{
mainCommandBuffer->EndRenderPass(syncObject);
}
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_FINISHED", [&](std::ostringstream& oss) {
- oss << "[" << targetstoPresent.size() << "]";
- });
-
// Flush UBOs
mImpl->uniformBufferManager->Flush(sceneObject, renderToFbo);
mImpl->renderAlgorithms.SubmitCommandBuffer();
rt = target;
}
}
-
- DALI_TRACE_END(gTraceFilter, "DALI_RENDER_FINISHED");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_FINISHED\n");
+ }
+#endif
}
void RenderManager::PostRender()
// Notify RenderGeometries that rendering has finished
if(mImpl->geometryContainer.Count() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_GEOMETRY_RENDER_FINISHED", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->geometryContainer.Count() << "]";
- });
for(auto&& iter : mImpl->geometryContainer)
{
iter->OnRenderFinished();
}
- DALI_TRACE_END(gTraceFilter, "DALI_GEOMETRY_RENDER_FINISHED");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_GEOMETRY_RENDER_FINISHED [%zu]\n", mImpl->geometryContainer.Count());
+ }
+#endif
}
// Notify updated RenderTexture that rendering has finished
if(mImpl->updatedTextures.Count() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_TEXTURE_UPDATED", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->updatedTextures.Count() << "]";
- });
for(auto&& iter : mImpl->updatedTextures)
{
iter->OnRenderFinished();
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_TEXTURE_UPDATED [%zu]\n", mImpl->updatedTextures.Count());
+ }
+#endif
mImpl->updatedTextures.Clear();
- DALI_TRACE_END(gTraceFilter, "DALI_TEXTURE_UPDATED");
}
// Remove discarded textures after OnRenderFinished called
#include <sstream>
// INTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
#include <dali/integration-api/trace.h>
#include <dali/internal/common/message.h>
void RenderQueue::ProcessMessages(BufferIndex bufferIndex)
{
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_RENDER_MESSAGE_QUEUE_PROCESS");
std::size_t capacity = container0->GetCapacity() + container1->GetCapacity();
mCapacity = capacity; // write is atomic.
container->Reset();
LimitBufferCapacity(bufferIndex);
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_MESSAGE_QUEUE_PROCESS", [&](std::ostringstream& oss) {
- oss << "[" << messageCount << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDER_MESSAGE_QUEUE_PROCESS [%u]\n", messageCount);
+ }
+#endif
}
MessageBuffer* RenderQueue::GetCurrentContainer(BufferIndex bufferIndex)
return ((lhs->GetIntervalDelay() + lhs->GetDuration()) < (rhs->GetIntervalDelay() + rhs->GetDuration()));
}
-// TODO : The name of trace marker name is from VD specific. We might need to change it future.
-DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
-
} // unnamed namespace
namespace Dali
if(!mFrameCallbacks.empty())
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_FRAME_CALLBACK_UPDATE", [&](std::ostringstream& oss) {
- oss << "[" << mFrameCallbacks.size() << "]";
- });
-
#ifdef TRACE_ENABLED
std::vector<std::pair<uint64_t, uint32_t>> frameCallbackTimeChecker;
uint32_t frameIndex = 0u;
+ uint64_t start = 0u;
+ uint64_t end = 0u;
#endif
// If any of the FrameCallback::Update calls returns false, then they are no longer required & can be removed.
auto iter = std::remove_if(
mFrameCallbacks.begin(), mFrameCallbacks.end(), [&](OwnerPointer<FrameCallback>& frameCallback) {
#ifdef TRACE_ENABLED
- uint64_t start = GetNanoSeconds();
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ start = GetNanoSeconds();
+ }
#endif
FrameCallback::RequestFlags requests = frameCallback->Update(bufferIndex, elapsedSeconds, mNodeHierarchyChanged);
#ifdef TRACE_ENABLED
- uint64_t end = GetNanoSeconds();
- frameCallbackTimeChecker.emplace_back(end - start, ++frameIndex);
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ end = GetNanoSeconds();
+ frameCallbackTimeChecker.emplace_back(end - start, ++frameIndex);
+ }
#endif
keepRendering |= (requests & FrameCallback::KEEP_RENDERING);
return (requests & FrameCallback::CONTINUE_CALLING) == 0;
});
mFrameCallbacks.erase(iter, mFrameCallbacks.end());
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_FRAME_CALLBACK_UPDATE", [&](std::ostringstream& oss) {
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ std::ostringstream oss;
oss << "[" << mFrameCallbacks.size() << ",";
std::sort(frameCallbackTimeChecker.rbegin(), frameCallbackTimeChecker.rend());
oss << frameCallbackTimeChecker[i].second << ")";
}
oss << "]";
- });
+ DALI_LOG_DEBUG_INFO("END: DALI_FRAME_CALLBACK_UPDATE [%s]\n", oss.str().c_str());
+ }
+#endif
}
mNodeHierarchyChanged = false;
bool isRenderingToFbo,
bool processOffscreen)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_TASK_PROCESS");
uint32_t clippingId = 0u;
bool hasClippingNodes = false;
}
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_TASK_PROCESS\n");
+ }
+#endif
}
} // Anonymous namespace.
}
else
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_SCENE_GRAPH_TRAVELER", [&](std::ostringstream& oss) {
- oss << "[" << mTravledNodeMap.size() << "]";
- });
while(!FullSearched())
{
SceneGraph::Node& currentNode = GetCurrentNode();
break;
}
}
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_SCENE_GRAPH_TRAVELER", [&](std::ostringstream& oss) {
- oss << "[" << mTravledNodeMap.size() << ",";
- oss << "found:" << (node == nullptr ? 0 : 1) << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_SCENE_GRAPH_TRAVELER [%zu,found:%d]\n", mTravledNodeMap.size(), (node == nullptr ? 0 : 1));
+ }
+#endif
}
return node;
{
if(mComponentCount)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_TRANSFORM_RESET_TO_BASE");
memcpy(&mTxComponentAnimatable[0], &mTxComponentAnimatableBaseValue[0], sizeof(TransformComponentAnimatable) * mComponentCount);
memcpy(&mSize[0], &mSizeBase[0], sizeof(Vector3) * mComponentCount);
memset(&mLocalMatrixDirty[0], false, sizeof(bool) * mComponentCount);
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_TRANSFORM_RESET_TO_BASE\n");
+ }
+#endif
}
}
{
bool componentsChanged = false;
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_TRANSFORM_UPDATE", [&](std::ostringstream& oss) {
- oss << "[" << mComponentCount << "]";
- });
-
if(mReorder)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_TRANSFORM_REORDER");
//If some transform component has change its parent or has been removed since last update
//we need to reorder the vectors
ReorderComponents();
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_TRANSFORM_REORDER\n");
+ }
+#endif
mReorder = false;
}
mComponentDirty[i] = false;
}
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_TRANSFORM_UPDATE", [&](std::ostringstream& oss) {
- oss << "[componentsChanged:" << componentsChanged << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_TRANSFORM_UPDATE [%zu,%d]\n", mComponentCount, componentsChanged);
+ }
+#endif
return componentsChanged;
}
#include <dali/integration-api/debug.h>
#include <dali/integration-api/trace.h>
-namespace
-{
-// TODO : The name of trace marker name is from VD specific. We might need to change it future.
-DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
-} // namespace
-
namespace Dali
{
namespace Internal
return NodePropertyFlags::NOTHING;
}
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_UPDATE_NODE_TREE");
-
// If the root node was not previously visible
BufferIndex previousBuffer = updateBufferIndex ? 0u : 1u;
if(DALI_UNLIKELY(!rootNode.IsVisible(previousBuffer))) // almost never ever true
updated);
}
- DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_NODE_TREE");
-
return cumulativeDirtyFlags;
}
if(mImpl->nodeResetters.Count() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_NODE_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->nodeResetters.Count() << "]";
- });
// Reset node properties
mImpl->nodeResetters.ResetToBaseValues(bufferIndex);
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_NODE_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->nodeResetters.Count() << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_NODE_RESETTER [%zu]\n", mImpl->nodeResetters.Count());
+ }
+#endif
}
if(mImpl->rendererResetters.Count() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDERER_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->rendererResetters.Count() << "]";
- });
// Reset renderer properties
mImpl->rendererResetters.ResetToBaseValues(bufferIndex);
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDERER_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->rendererResetters.Count() << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_RENDERER_RESETTER [%zu]\n", mImpl->rendererResetters.Count());
+ }
+#endif
}
if(mImpl->propertyResetters.Count() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_PROPERTY_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->propertyResetters.Count() << "]";
- });
// Reset all animating / constrained properties
mImpl->propertyResetters.ResetToBaseValues(bufferIndex);
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_PROPERTY_RESETTER", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->propertyResetters.Count() << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_PROPERTY_RESETTER [%zu]\n", mImpl->propertyResetters.Count());
+ }
+#endif
}
// Clear all root nodes dirty flags
root->ResetDirtyFlags(bufferIndex);
}
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_NODE_RESET", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->nodes.Count() << "]";
- });
// Clear node dirty flags
Vector<Node*>::Iterator iter = mImpl->nodes.Begin() + 1;
Vector<Node*>::Iterator endIter = mImpl->nodes.End();
{
(*iter)->ResetDirtyFlags(bufferIndex);
}
- DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_NODE_RESET");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_NODE_RESET [%zu]\n", mImpl->nodes.Count());
+ }
+#endif
}
bool UpdateManager::ProcessGestures(BufferIndex bufferIndex, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds)
// gesture processor only supports default properties
mImpl->panGestureProcessor->ResetDefaultProperties(bufferIndex); // Needs to be done every time as gesture data is written directly to an update-buffer rather than via a message
gestureUpdated |= mImpl->panGestureProcessor->UpdateProperties(lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds);
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_GESTURE [updated:%d]\n", gestureUpdated);
+ }
+#endif
}
return gestureUpdated;
auto&& iter = mImpl->animations.Begin();
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->animations.Count() << "]";
- });
-
while(iter != mImpl->animations.End())
{
Animation* animation = *iter;
mImpl->notificationManager.QueueNotification(&mImpl->animationPlaylist, std::move(mImpl->notifyRequiredAnimations));
}
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss) {
- oss << "[" << mImpl->animations.Count() << "]";
- });
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled() && mImpl->animations.Count() > 0u)
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_ANIMATION_ANIMATE [%zu active:%d]\n", mImpl->animations.Count(), animationActive);
+ }
+#endif
return animationActive;
}
void UpdateManager::ConstrainCustomObjects(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_CONSTRAINT_CUSTOM_OBJECTS");
// Constrain custom objects (in construction order)
for(auto&& object : mImpl->customObjects)
{
postPropertyOwners.PushBack(object);
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled() && mImpl->customObjects.Count() > 0u)
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_CONSTRAINT_CUSTOM_OBJECTS [%zu]\n", mImpl->customObjects.Count());
+ }
+#endif
}
void UpdateManager::ConstrainRenderTasks(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_CONSTRAINT_RENDER_TASK");
+#ifdef TRACE_ENABLED
+ uint32_t taskCount = 0u;
+#endif
// Constrain render-tasks
for(auto&& scene : mImpl->scenes)
{
RenderTaskList::RenderTaskContainer& tasks = scene->taskList->GetTasks();
for(auto&& task : tasks)
{
+#ifdef TRACE_ENABLED
+ ++taskCount;
+#endif
ConstrainPropertyOwner(*task, bufferIndex);
if(!task->GetPostConstraints().Empty())
{
}
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled() && taskCount > 0u)
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_CONSTRAINT_RENDER_TASK [%u]\n", taskCount);
+ }
+#endif
}
void UpdateManager::ConstrainShaders(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_CONSTRAINT_SHADER");
// constrain shaders... (in construction order)
for(auto&& shader : mImpl->shaders)
{
postPropertyOwners.PushBack(shader);
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled() && mImpl->shaders.Count() > 0u)
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_CONSTRAINT_SHADER [%zu]\n", mImpl->shaders.Count());
+ }
+#endif
}
void UpdateManager::ProcessPropertyNotifications(BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_PROPERTY_NOTIFICATION");
for(auto&& notification : mImpl->propertyNotifications)
{
bool valid = notification->Check(bufferIndex);
mImpl->notificationManager.QueueMessage(PropertyChangedMessage(mImpl->propertyNotifier, notification->GetNotifyId(), notification->GetValidity()));
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled() && mImpl->propertyNotifications.Count() > 0u)
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_PROPERTY_NOTIFICATION [%zu]\n", mImpl->propertyNotifications.Count());
+ }
+#endif
}
void UpdateManager::ForwardCompiledShadersToEventThread()
void UpdateManager::UpdateRenderers(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_RENDERER");
for(const auto& rendererKey : mImpl->renderers)
{
// Apply constraints
mImpl->renderingRequired = renderer->PrepareRender(bufferIndex) || mImpl->renderingRequired;
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_RENDERER [%zu]\n", mImpl->renderers.Count());
+ }
+#endif
}
void UpdateManager::UpdateNodes(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_NODES");
mImpl->nodeDirtyFlags = NodePropertyFlags::NOTHING;
for(auto&& scene : mImpl->scenes)
postPropertyOwners);
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_NODES\n");
+ }
+#endif
}
void UpdateManager::UpdateLayers(BufferIndex bufferIndex)
{
- DALI_TRACE_SCOPE(gTraceFilter, "DALI_UPDATE_LAYER");
for(auto&& scene : mImpl->scenes)
{
if(scene && scene->root)
SceneGraph::UpdateLayerTree(*scene->root, bufferIndex);
}
}
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_LAYER\n");
+ }
+#endif
}
uint32_t UpdateManager::Update(float elapsedSeconds,
bool isAnimationRunning = IsAnimationRunning();
// Process Touches & Gestures
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_UPDATE_GESTURE");
const bool gestureUpdated = ProcessGestures(bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds);
- DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_GESTURE");
bool updateScene = // The scene-graph requires an update if..
(mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
// We should not start skipping update steps or reusing lists until there has been two frames where nothing changes
if(updateScene || mImpl->previousUpdateScene)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_INTERNAL", [&](std::ostringstream& oss) {
- oss << "[node:" << mImpl->nodes.Size() << ",";
- oss << "custom:" << mImpl->customObjects.Size() << ",";
- oss << "animations:" << mImpl->animations.Size() << ",";
- oss << "renderers:" << mImpl->renderers.Size() << ",";
- oss << "textureSets:" << mImpl->textureSets.Size() << ",";
- oss << "shaders:" << mImpl->shaders.Size() << "]";
- });
-
// Animate
bool animationActive = Animate(bufferIndex, elapsedSeconds);
// reset the update buffer index and make sure there is enough room in the instruction container
if(mImpl->renderersAdded)
{
- DALI_TRACE_BEGIN(gTraceFilter, "DALI_UPDATE_TASK_PROCESS");
-
// Calculate how many render tasks we have in total
std::size_t numberOfRenderTasks = 0;
for(auto&& scene : mImpl->scenes)
}
DALI_LOG_INFO(gLogFilter, Debug::General, "Update: numberOfRenderTasks(%d), Render Instructions(%d)\n", numberOfRenderTasks, numberOfRenderInstructions);
- DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_TASK_PROCESS");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_TASK_PROCESS\n");
+ }
+#endif
}
- DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_INTERNAL");
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ std::ostringstream oss;
+ oss << "[n:" << mImpl->nodes.Size() << ",";
+ oss << "c:" << mImpl->customObjects.Size() << ",";
+ oss << "a:" << mImpl->animations.Size() << ",";
+ oss << "r:" << mImpl->renderers.Size() << ",";
+ oss << "t:" << mImpl->textureSets.Size() << ",";
+ oss << "s:" << mImpl->shaders.Size() << "]";
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_INTERNAL [%s]\n", oss.str().c_str());
+ }
+#endif
}
if(!uploadOnly)
// INTERNAL INCLUDES
#include <dali/devel-api/threading/mutex.h>
+#include <dali/integration-api/debug.h>
#include <dali/integration-api/render-controller.h>
#include <dali/integration-api/trace.h>
#include <dali/internal/common/message-buffer.h>
{
// queueMutex must be locked whilst accessing processQueue or recycleQueue
MessageQueueMutex::ScopedLock lock(mImpl->queueMutex);
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_MESSAGE_QUEUE_FLUSH", [&](std::ostringstream& oss) {
- oss << "[capacity:" << mImpl->currentMessageBuffer->GetCapacity() << "]";
- });
mImpl->processQueue.push_back(mImpl->currentMessageBuffer);
mImpl->currentMessageBuffer = nullptr;
mImpl->sceneUpdate |= 2;
mImpl->sceneUpdateFlag = false;
}
- DALI_TRACE_END(gTraceFilter, "DALI_MESSAGE_QUEUE_FLUSH");
+
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ DALI_LOG_DEBUG_INFO("END: DALI_MESSAGE_QUEUE_FLUSH [%zu]\n", mImpl->currentMessageBuffer->GetCapacity());
+ }
+#endif
}
return messagesToProcess;
copiedProcessQueue = std::move(mImpl->processQueue); // Move message queue
}
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_MESSAGE_QUEUE_PROCESS", [&](std::ostringstream& oss) {
- oss << "[queueCount:" << copiedProcessQueue.size() << "]";
- });
-
uint32_t messageCount = 0u;
for(auto&& buffer : copiedProcessQueue)
std::make_move_iterator(copiedProcessQueue.end()));
// Note trace end inside of mutex, since we need to check recycleQueue size correct.
- DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_MESSAGE_QUEUE_PROCESS", [&](std::ostringstream& oss) {
+#ifdef TRACE_ENABLED
+ if(gTraceFilter && gTraceFilter->IsTraceEnabled())
+ {
+ std::ostringstream oss;
oss << "[messageCount:" << messageCount << ",";
oss << "recycleQueueCount:" << mImpl->recycleQueue.size() << "]";
- });
+ DALI_LOG_DEBUG_INFO("END: DALI_UPDATE_MESSAGE_QUEUE_PROCESS [%s]\n", oss.str().c_str());
+ }
+#endif
}
PERF_MONITOR_END(PerformanceMonitor::PROCESS_MESSAGES);