From 95698acb3350a49ee2513ce6145fec357df1f883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E9=B9=8F=E9=A3=9E?= Date: Thu, 2 Nov 2023 16:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=91=E5=8A=A8=E8=B0=83=E7=94=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/browser/renderer_host/input/input_router_impl.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc index 8eeb8011d2..c6e09bd9b4 100644 --- a/content/browser/renderer_host/input/input_router_impl.cc +++ b/content/browser/renderer_host/input/input_router_impl.cc @@ -34,7 +34,7 @@ #include "ui/events/blink/web_input_event_traits.h" #include "ui/events/event.h" #include "ui/events/keycodes/keyboard_codes.h" - +#include "ohos_adapter_helper.h" namespace content { using blink::WebGestureEvent; @@ -72,6 +72,7 @@ std::unique_ptr ScaleEvent( std::vector>(), latency_info); } constexpr uint64_t GESTURE_MOVE_PERIOD = 250000000; +const int SOC_PERF_SLIDE_NORMAL_CONFIG_ID = 10025; } // namespace InputRouterImpl::InputRouterImpl( @@ -148,10 +149,16 @@ void InputRouterImpl::SendGestureEvent( prePerfTimeStamp_ = timeStamp_; LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureScrollUpdate success"; client_->GetWidgetInputHandler()->TryStartFling(); + OHOS::NWeb::OhosAdapterHelper::GetInstance() + .CreateSocPerfClientAdapter() + ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, true); } else if (gesture_event.event.GetType() == WebInputEvent::Type::kGestureScrollEnd) { LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureScrollEnd"; client_->GetWidgetInputHandler()->TryFinishFling(); + OHOS::NWeb::OhosAdapterHelper::GetInstance() + .CreateSocPerfClientAdapter() + ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, false); prePerfTimeStamp_ = 0; } #endif -- Gitee