From 778b2e9ab9a26409b464c2bd9195fae8100a10d1 Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Wed, 5 Apr 2023 11:20:53 +0900 Subject: [PATCH] [Tizen] Add trace log for touch, wheel and gesture Change-Id: Iaf3a78103d123d4c81a9668497663cc14947ed44 --- dali/internal/event/events/hover-event-processor.cpp | 5 +++++ .../events/long-press-gesture/long-press-gesture-processor.cpp | 5 ++++- dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp | 6 +++++- .../event/events/pinch-gesture/pinch-gesture-processor.cpp | 5 ++++- .../event/events/rotation-gesture/rotation-gesture-processor.cpp | 5 ++++- dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp | 5 ++++- dali/internal/event/events/touch-event-processor.cpp | 8 +++++++- dali/internal/event/events/wheel-event-processor.cpp | 6 +++++- 8 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dali/internal/event/events/hover-event-processor.cpp b/dali/internal/event/events/hover-event-processor.cpp index 0f61ab5..17d8193 100644 --- a/dali/internal/event/events/hover-event-processor.cpp +++ b/dali/internal/event/events/hover-event-processor.cpp @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include #include @@ -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)); diff --git a/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp b/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp index 7c57cd0..9110533 100644 --- a/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp +++ b/dali/internal/event/events/long-press-gesture/long-press-gesture-processor.cpp @@ -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 +#include #include #include #include @@ -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: diff --git a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp index c548833..7961b40 100644 --- a/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp +++ b/dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp @@ -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 +#include #include #include #include @@ -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: diff --git a/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp b/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp index 2483fc6..8b65445 100644 --- a/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp +++ b/dali/internal/event/events/pinch-gesture/pinch-gesture-processor.cpp @@ -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 +#include #include #include #include @@ -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: diff --git a/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp b/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp index 6596f0d..c9ae0e4 100644 --- a/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp +++ b/dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp @@ -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 +#include #include #include #include @@ -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: diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp b/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp index 0ac00f0..0c43d8f 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp +++ b/dali/internal/event/events/tap-gesture/tap-gesture-processor.cpp @@ -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 +#include #include #include #include @@ -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: diff --git a/dali/internal/event/events/touch-event-processor.cpp b/dali/internal/event/events/touch-event-processor.cpp index 2eca85a..debd7ed 100644 --- a/dali/internal/event/events/touch-event-processor.cpp +++ b/dali/internal/event/events/touch-event-processor.cpp @@ -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 #include +#include #include #include #include @@ -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. diff --git a/dali/internal/event/events/wheel-event-processor.cpp b/dali/internal/event/events/wheel-event-processor.cpp index f7a082f..c54cd3e 100644 --- a/dali/internal/event/events/wheel-event-processor.cpp +++ b/dali/internal/event/events/wheel-event-processor.cpp @@ -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 #include +#include #include #include #include @@ -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(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; -- 2.7.4