Add trace log for touch, wheel and gesture 09/290909/2
authorjoogab.yun <joogab.yun@samsung.com>
Wed, 5 Apr 2023 02:20:53 +0000 (11:20 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Wed, 5 Apr 2023 03:58:36 +0000 (12:58 +0900)
Change-Id: Iaf3a78103d123d4c81a9668497663cc14947ed44

dali/internal/event/events/hover-event-processor.cpp
dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp
dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp
dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp
dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp
dali/internal/event/events/touch-event-processor.cpp
dali/internal/event/events/wheel-event-processor.cpp

index 0f61ab5..17d8193 100644 (file)
@@ -25,6 +25,7 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/hover-event-integ.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
@@ -40,6 +41,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_HOVER_PROCESSOR");
 
@@ -73,6 +75,7 @@ Dali::Actor EmitHoverSignals(Dali::Actor actor, const Dali::HoverEvent& event)
     // Only emit the signal if the actor's hover signal has connections (or derived actor implementation requires hover).
     if(actorImpl.GetHoverRequired())
     {
+      DALI_TRACE_SCOPE(gTraceFilter, "DALI_EMIT_HOVER_EVENT_SIGNAL");
       consumed = actorImpl.EmitHoverEventSignal(event);
     }
 
@@ -183,6 +186,8 @@ void HoverEventProcessor::ProcessHoverEvent(const Integration::HoverEvent& event
 
   PRINT_HIERARCHY(gLogFilter);
 
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_HOVER_EVENT");
+
   // Copy so we can add the results of a hit-test.
   HoverEventPtr hoverEvent(new HoverEvent(event.time));
 
index 7c57cd0..9110533 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/gesture-requests.h>
@@ -39,6 +40,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 const unsigned long DEFAULT_MINIMUM_HOLDING_TIME = 500u;
 
 /**
@@ -116,6 +118,7 @@ LongPressGestureProcessor::~LongPressGestureProcessor() = default;
 
 void LongPressGestureProcessor::Process(Scene& scene, const LongPressGestureEvent& longPressEvent)
 {
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_LONG_PRESS_GESTURE");
   switch(longPressEvent.state)
   {
     case GestureState::POSSIBLE:
index c548833..7961b40 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -27,6 +27,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/gesture-requests.h>
 #include <dali/internal/event/events/multi-point-event-util.h>
@@ -47,6 +48,7 @@ namespace Internal
 {
 namespace // unnamed namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_PAN_PROCESSOR");
 
@@ -151,6 +153,8 @@ void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
   DALI_LOG_INFO(gLogFilter, Debug::General, "      Positions: Current: (%.0f, %.0f), Previous: (%.0f, %.0f)\n", panEvent.currentPosition.x, panEvent.currentPosition.y, panEvent.previousPosition.x, panEvent.previousPosition.y);
 #endif
 
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_PAN_GESTURE");
+
   switch(panEvent.state)
   {
     case GestureState::POSSIBLE:
index 2483fc6..8b65445 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/gesture-requests.h>
 #include <dali/internal/event/events/pinch-gesture/pinch-gesture-event.h>
@@ -39,6 +40,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 const uint32_t MINIMUM_TOUCH_EVENTS_REQUIRED             = 4u;
 const uint32_t MINIMUM_TOUCH_EVENTS_REQUIRED_AFTER_START = 4u;
 
@@ -167,6 +169,7 @@ void PinchGestureProcessor::SetMinimumTouchEventsAfterStart(uint32_t value)
 
 void PinchGestureProcessor::Process(Scene& scene, const PinchGestureEvent& pinchEvent)
 {
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_PINCH_GESTURE");
   switch(pinchEvent.state)
   {
     case GestureState::STARTED:
index 6596f0d..c9ae0e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/gesture-requests.h>
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-event.h>
@@ -39,6 +40,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 const uint32_t MINIMUM_TOUCH_EVENTS_REQUIRED             = 4u;
 const uint32_t MINIMUM_TOUCH_EVENTS_REQUIRED_AFTER_START = 4u;
 
@@ -113,6 +115,7 @@ RotationGestureProcessor::RotationGestureProcessor()
 
 void RotationGestureProcessor::Process(Scene& scene, const RotationGestureEvent& rotationEvent)
 {
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_ROTATION_GESTURE");
   switch(rotationEvent.state)
   {
     case GestureState::STARTED:
index 0ac00f0..0c43d8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/gesture-requests.h>
@@ -41,6 +42,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 constexpr uint32_t DEFAULT_MAXIMUM_ALLOWED_TIME = 500u;
 
 /**
@@ -92,6 +94,7 @@ TapGestureProcessor::~TapGestureProcessor() = default;
 
 void TapGestureProcessor::Process(Scene& scene, const TapGestureEvent& tapEvent)
 {
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_TAP_GESTURE");
   switch(tapEvent.state)
   {
     case GestureState::POSSIBLE:
index 2eca85a..debd7ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -25,6 +25,7 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
@@ -42,6 +43,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_TOUCH_PROCESSOR");
 
@@ -66,6 +68,7 @@ Dali::Actor EmitInterceptTouchSignals(Dali::Actor actor, const Dali::TouchEvent&
     Dali::Actor parent = actor.GetParent();
     if(parent)
     {
+      DALI_TRACE_SCOPE(gTraceFilter, "DALI_EMIT_INTERCEPT_TOUCH_EVENT_SIGNAL");
       // Recursively deliver events to the actor and its parents for intercept touch event.
       interceptedActor = EmitInterceptTouchSignals(parent, touchEvent);
     }
@@ -106,6 +109,7 @@ Dali::Actor EmitTouchSignals(Dali::Actor actor, const Dali::TouchEvent& touchEve
     // Only emit the signal if the actor's touch signal has connections (or derived actor implementation requires touch).
     if(actorImpl.GetTouchRequired())
     {
+      DALI_TRACE_SCOPE(gTraceFilter, "DALI_EMIT_TOUCH_EVENT_SIGNAL");
       consumed = actorImpl.EmitTouchEventSignal(touchEvent);
     }
 
@@ -253,6 +257,8 @@ bool TouchEventProcessor::ProcessTouchEvent(const Integration::TouchEvent& event
 
   PRINT_HIERARCHY(gLogFilter);
 
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_TOUCH_EVENT");
+
   // 1) Check if it is an interrupted event - we should inform our last primary hit actor about this
   //    and emit the stage signal as well.
 
index f7a082f..c54cd3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -23,6 +23,7 @@
 
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/wheel-event-integ.h>
+#include <dali/integration-api/trace.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
@@ -35,6 +36,7 @@ namespace Internal
 {
 namespace
 {
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WHEEL_PROCESSOR");
 #endif
@@ -132,6 +134,8 @@ void WheelEventProcessor::ProcessWheelEvent(const Integration::WheelEvent& event
   WheelEventPtr    wheelEvent = WheelEvent::New(static_cast<Dali::WheelEvent::Type>(event.type), event.direction, event.modifiers, event.point, event.delta, event.timeStamp);
   Dali::WheelEvent wheelEventHandle(wheelEvent.Get());
 
+  DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_WHEEL_EVENT");
+
   if(wheelEvent->GetType() == Dali::WheelEvent::MOUSE_WHEEL)
   {
     Dali::HitTestAlgorithm::Results hitTestResults;