/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
#include <dali/internal/render/common/render-algorithms.h>
// INTERNAL INCLUDES
+#include <dali/integration-api/trace.h>
#include <dali/internal/render/common/render-debug.h>
#include <dali/internal/render/common/render-instruction.h>
#include <dali/internal/render/common/render-list.h>
}
}
+// TODO : The name of trace marker is from VD specific.
+// We might need to change it as DALI_TRACE_RENDER_PROCESS.
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
} // Unnamed namespace
/**
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");
}
} // namespace Render
// INTERNAL INCLUDES
#include <dali/integration-api/core.h>
#include <dali/integration-api/ordered-set.h>
+#include <dali/integration-api/trace.h>
#include <dali/internal/event/common/scene-impl.h>
rect.width = ((right + 16) / 16) * 16 - rect.x;
rect.height = ((bottom + 16) / 16) * 16 - rect.y;
}
+
+// TODO : The name of trace marker is from VD specific.
+// We might need to change it as DALI_TRACE_RENDER_PROCESS.
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
} // namespace
/**
mainCommandBuffer->EndRenderPass(syncObject);
}
+ if(targetstoPresent.size() > 0u)
+ {
+ 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();
mImpl->commandBufferSubmitted = true;
- std::sort(targetstoPresent.begin(), targetstoPresent.end());
-
- Graphics::RenderTarget* rt = nullptr;
- for(auto& target : targetstoPresent)
+ if(targetstoPresent.size() > 0u)
{
- if(target != rt)
+ std::sort(targetstoPresent.begin(), targetstoPresent.end());
+
+ Graphics::RenderTarget* rt = nullptr;
+ for(auto& target : targetstoPresent)
{
- mImpl->graphicsController.PresentRenderTarget(target);
- rt = target;
+ if(target != rt)
+ {
+ mImpl->graphicsController.PresentRenderTarget(target);
+ rt = target;
+ }
}
+
+ DALI_TRACE_END(gTraceFilter, "DALI_RENDER_FINISHED");
}
}
namespace
{
-DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+// TODO : The name of trace marker is from VD specific.
+// We might need to change it as DALI_TRACE_UPDATE_PROCESS.
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
#ifdef TRACE_ENABLED
uint64_t GetNanoseconds()
#include <dali/public-api/common/constants.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
namespace Dali
{
}
}
+// TODO : The name of trace marker is from VD specific.
+// We might need to change it as DALI_TRACE_UPDATE_PROCESS.
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
} // unnamed namespace
TransformManager::TransformManager()
{
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();
mComponentDirty[i] = false;
}
+ DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_TRANSFORM_UPDATE", [&](std::ostringstream& oss) {
+ oss << "[componentsChanged:" << componentsChanged << "]";
+ });
+
return componentsChanged;
}
// INTERNAL INCLUDES
#include <dali/integration-api/core.h>
+#include <dali/integration-api/trace.h>
#include <dali/internal/common/owner-key-container.h>
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_UPDATE_MANAGER");
} // unnamed namespace
#endif
+namespace
+{
+// TODO : The name of trace marker is from VD specific.
+// We might need to change it as DALI_TRACE_UPDATE_PROCESS.
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
+} // namespace
using namespace Dali::Integration;
using Dali::Internal::Update::MessageQueue;
{
bool animationActive = false;
+ if(mImpl->animations.Empty())
+ {
+ return animationActive;
+ }
+
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() << "]";
+ });
+
return animationActive;
}
void UpdateManager::UpdateRenderers(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
{
+ if(mImpl->renderers.Empty())
+ {
+ return;
+ }
+
+ DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_RENDERERS", [&](std::ostringstream& oss) {
+ oss << "[" << mImpl->renderers.Count() << "]";
+ });
+
for(const auto& rendererKey : mImpl->renderers)
{
// Apply constraints
mImpl->renderingRequired = renderer->PrepareRender(bufferIndex) || mImpl->renderingRequired;
}
+
+ DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_RENDERERS");
}
void UpdateManager::UpdateNodes(PropertyOwnerContainer& postPropertyOwners, BufferIndex bufferIndex)
// 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 << "[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() << "]";
+ });
+
// Animate
bool animationActive = Animate(bufferIndex, elapsedSeconds);
DALI_LOG_INFO(gLogFilter, Debug::General, "Update: numberOfRenderTasks(%d), Render Instructions(%d)\n", numberOfRenderTasks, numberOfRenderInstructions);
}
+
+ DALI_TRACE_END(gTraceFilter, "DALI_UPDATE_INTERNAL");
}
if(!uploadOnly)