Repository: flutter
Issue: Pointer tracking has lots of delay on both debug/release mode
Labels: platform-android,engine,c: performance,platform-windows,f: gestures,perf: speed,P2,team-android,triaged-android

## Details

The project setup is quite simple: you mainly need a gesture detector (even a listener will do) and a custom painter inside a stateful widget. The gesture detector will track the pan events, save the offset of the last event in a variable inside the widget state and setState(). The custom painter will then use the offset to pain a simple circle on the screen. You can then test the behaviour by moving the pointer either slower/faster. Doing so you'll notice the circle will fall behind the pointer based on the speed, like it's chasing the pointer. With the timeline logs attached and the video you can notice the ui and raster thread is basically doing no major work, so the app is not skipping or delaying frames.

**A sample main.dart file is available [here](https://gist.github.com/HrX03/8d16aaef5068fb9c441ad9997a8fbe63)**

The video and timeline trace was made on flutter master using profile mode with the trace skia option.

[Video recording](https://user-images.githubusercontent.com/29352339/106350936-e470fc80-62d8-11eb-8d1d-bbe84de0353b.mp4) of the issue on windows running in profile mode

[Timeline trace](https://gist.github.com/HrX03/5fdcfcd61a4517e66a7a0486ff994d76) taken with Observer as instructed in the issue template, same platform and flutter mode.

## Info
**Target Platform:** Every platform, tested mainly on Windows and Android
**Target OS version/browser:** Any version
**Devices:** Any device potentially

## Logs

<details>
<summary>Flutter doctor logs</summary>

```
[√] Flutter (Channel master, 1.26.0-18.0.pre.81, on Microsoft Windows [Versione 10.0.21292.1010], locale it-IT)
    • Flutter version 1.26.0-18.0.pre.81 at C:\src\flutter
    • Framework revision cca9592f0e (10 hours ago), 2021-01-29 14:31:06 -0800
    • Engine revision 4cf5244cc5
    • Dart version 2.12.0 (build 2.12.0-276.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\dnbia\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.8.30907.101
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 4.1.0)
    • Android Studio at D:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[√] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versione 10.0.21292.1010]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 88.0.4324.104

• No issues found!
```

</details>