#include <dali/integration-api/input-options.h>
#include <dali/integration-api/processor-interface.h>
#include <dali/integration-api/profiling.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/object/any.h>
{
thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer to allow Adaptor::Get
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
} // unnamed namespace
Dali::Adaptor* Adaptor::New(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode)
mPerformanceInterface->AddMarker(PerformanceInterface::PROCESS_EVENTS_START);
}
-#if !defined(DALI_PROFILE_UBUNTU) && !defined(DALI_PROFILE_LIBUV_X11) && !defined(DALI_PROFILE_GLIB_X11)
- DALI_LOG_RELEASE_INFO("Start ProcessEvents\n");
-#endif
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_PROCESS_CORE_EVENTS");
mCore->ProcessEvents();
-#if !defined(DALI_PROFILE_UBUNTU) && !defined(DALI_PROFILE_LIBUV_X11) && !defined(DALI_PROFILE_GLIB_X11)
- DALI_LOG_RELEASE_INFO("End ProcessEvents\n");
-#endif
+ DALI_TRACE_END(gTraceFilter, "DALI_PROCESS_CORE_EVENTS");
if(mPerformanceInterface)
{
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
*
*/
-// EXTERNAL INCLUDES
+// CLASS HEADER
#include <dali/internal/trace/tizen/trace-manager-impl-tizen.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
#include <ttrace.h>
// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/environment-variable.h>
namespace Dali
{
{
namespace Adaptor
{
+namespace
+{
+const char* DALI_TRACE_ENABLE_PRINT_LOG_ENV = "DALI_TRACE_ENABLE_PRINT_LOG";
+static bool gTraceManagerEnablePrintLog = false;
+
+} // namespace
+
TraceManagerTizen::TraceManagerTizen(PerformanceInterface* performanceInterface)
: TraceManager(performanceInterface)
{
+ const char* enablePrintLog = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TRACE_ENABLE_PRINT_LOG_ENV);
+ if(enablePrintLog && std::atoi(enablePrintLog) != 0)
+ {
+ gTraceManagerEnablePrintLog = true;
+ }
}
Dali::Integration::Trace::LogContextFunction TraceManagerTizen::GetLogContextFunction()
if(start)
{
traceBegin(TTRACE_TAG_GRAPHICS, tag);
+
+ if(gTraceManagerEnablePrintLog)
+ {
+ DALI_LOG_RELEASE_INFO("BEGIN: %s\n", tag);
+ }
}
else
{
traceEnd(TTRACE_TAG_GRAPHICS);
+
+ if(gTraceManagerEnablePrintLog)
+ {
+ DALI_LOG_RELEASE_INFO("END: %s\n", tag);
+ }
}
}
WindowOrientation Window::GetPreferredOrientation()
{
- DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), GetPreferredOrientation: %d\n", this, mNativeWindowId, mPreferredAngle);
WindowOrientation preferredOrientation = ConvertToOrientation(mPreferredAngle);
return preferredOrientation;
}
void Window::SetPosition(Dali::Window::WindowPosition position)
{
PositionSize oldRect = mSurface->GetPositionSize();
- int32_t newX = position.GetX();
- int32_t newY = position.GetY();
+ int32_t newX = position.GetX();
+ int32_t newY = position.GetY();
mWindowSurface->MoveResize(PositionSize(newX, newY, oldRect.width, oldRect.height));
if((oldRect.x != newX) || (oldRect.y != newY))
{
- Dali::Window handle(this);
+ Dali::Window handle(this);
Dali::Window::WindowPosition newPosition(newX, newY);
DALI_LOG_RELEASE_INFO("send moved signal with new position: %d, %d\n", newPosition.GetX(), newPosition.GetY());
void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize)
{
- bool resized = false;
- bool moved = false;
+ bool resized = false;
+ bool moved = false;
Dali::Window handle(this);
PositionSize oldRect = mSurface->GetPositionSize();
{
Uint16Pair newSize(newRect.width, newRect.height);
- mWindowWidth = newRect.width;
- mWindowHeight = newRect.height;
+ mWindowWidth = newRect.width;
+ mWindowHeight = newRect.height;
SurfaceResized();
WindowOrientation Window::GetCurrentOrientation() const
{
- DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), GetCurrentOrientation(): %d\n", this, mNativeWindowId, mRotationAngle);
return ConvertToOrientation(mRotationAngle);
}
// EXTERNAL_HEADERS
#include <Ecore_Input.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/adaptor-framework/window-enumerations.h>
#include <dali/public-api/events/mouse-button.h>
#include <dali/public-api/object/any.h>
Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW_BASE");
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
const uint32_t MAX_TIZEN_CLIENT_VERSION = 7;
const unsigned int PRIMARY_TOUCH_BUTTON_ID = 1;
std::string keyString("");
std::string compose("");
- DALI_LOG_RELEASE_INFO("OnKeyDown Start [%s]\n", keyName.c_str());
+#ifdef TRACE_ENABLED
+ std::ostringstream stream;
+ if(gTraceFilter->IsTraceEnabled())
+ {
+ stream << "DALI_ON_KEY_DOWN [" << keyName << "]\n";
+ DALI_TRACE_BEGIN(gTraceFilter, stream.str().c_str());
+ }
+#endif
// Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
if(keyEvent->compose)
mKeyEventSignal.Emit(keyEvent);
- DALI_LOG_RELEASE_INFO("OnKeyDown End [%s]\n", keyName.c_str());
+#ifdef TRACE_ENABLED
+ if(gTraceFilter->IsTraceEnabled())
+ {
+ DALI_TRACE_END(gTraceFilter, stream.str().c_str());
+ }
+#endif
}
}
std::string keyString("");
std::string compose("");
- DALI_LOG_RELEASE_INFO("OnKeyUp Start [%s]\n", keyName.c_str());
+#ifdef TRACE_ENABLED
+ std::ostringstream stream;
+ if(gTraceFilter->IsTraceEnabled())
+ {
+ stream << "DALI_ON_KEY_UP [" << keyName << "]" << std::endl;
+ DALI_TRACE_BEGIN(gTraceFilter, stream.str().c_str());
+ }
+#endif
// Ensure key compose string is not NULL as keys like SHIFT or arrow have a null string.
if(keyEvent->compose)
mKeyEventSignal.Emit(keyEvent);
- DALI_LOG_RELEASE_INFO("OnKeyUp End [%s]\n", keyName.c_str());
+#ifdef TRACE_ENABLED
+ if(gTraceFilter->IsTraceEnabled())
+ {
+ DALI_TRACE_END(gTraceFilter, stream.str().c_str());
+ }
+#endif
}
}