Skip to content

ScrollView inertia and wheel motion tick on a 17 ms thread-pool timer #24730

Closed

Description

@MartinZikmund

Current behavior 🐛

ScrollView (InteractionTracker) touch inertia and mouse-wheel motion are advanced by a 17 ms System.Threading.Timer on the thread pool, which also writes the tracker position and state from that thread. The content therefore moves at most ~59 times per second and beats against the display: on 120 Hz displays about half of the presented frames repeat the previous position (measured: ScrollView fling ~55–68 new frames/s on Win32 119 Hz, Galaxy Z Fold7 120 Hz and iPhone 13 Pro 120 Hz). The Translation shown in a frame also lags the tracker by one dispatcher hop, sub-detent wheel deltas (touchpads, MouseWheelDelta < 120) are truncated to zero, and a finger pressed on a coasting ScrollView does not stop it.

Expected behavior 🎯

ScrollView motion advances once per rendered frame on the UI thread, at the display refresh rate, and a pressed finger stops inertia (WinUI InteractionTracker behavior).

How to reproduce it (as minimally and precisely as possible) 🔬

Fling or wheel-scroll any ScrollView on a 120 Hz display and compare with a ScrollViewer; or run the Scrolling/ScrollSmoothnessTester sample's ScrollView tabs with the frame probe (see #24711).

Workaround 🛠️

None.

Renderer 🎨

  • Skia

Affected platforms 📱💻🖥️

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Windows (Skia)
  • Linux (Skia)

Uno.Sdk version (and other relevant versions) 📦

master (Uno Platform 7.0 dev)

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

Found while investigating #23985.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions