From 8dcf0235e5e28d558776c94b633c348dea9c4e53 Mon Sep 17 00:00:00 2001 From: liyuqian Date: Mon, 16 Dec 2019 17:14:19 -0800 Subject: [PATCH] Apply SmoothPointerDataDispatcher to Fuchsia (flutter/engine#14514) Fixes https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=35050 and https://github.com/flutter/flutter/issues/38811 --- .../flutter/shell/platform/fuchsia/flutter/platform_view.cc | 6 ++++++ .../flutter/shell/platform/fuchsia/flutter/platform_view.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.cc index 541851ae5af..7c6886e5b6e 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.cc @@ -766,4 +766,10 @@ void PlatformView::HandleFlutterPlatformViewsChannelPlatformMessage( } } +flutter::PointerDataDispatcherMaker PlatformView::GetDispatcherMaker() { + return [](flutter::DefaultPointerDataDispatcher::Delegate& delegate) { + return std::make_unique(delegate); + }; +} + } // namespace flutter_runner diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.h b/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.h index ef30c0a3de7..e02bf8d0c53 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.h +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/platform_view.h @@ -70,6 +70,9 @@ class PlatformView final : public flutter::PlatformView, // |flutter_runner::AccessibilityBridge::Delegate| void SetSemanticsEnabled(bool enabled) override; + // |PlatformView| + flutter::PointerDataDispatcherMaker GetDispatcherMaker() override; + private: const std::string debug_label_; // TODO(MI4-2490): remove once ViewRefControl is passed to Scenic and kept