Skip to content

Measure scroll smoothness in the SamplesApp #24708

Closed

Description

@MartinZikmund

What would you like to be added? 💡

A quantitative scroll-smoothness probe in the SamplesApp, so a scrolling/rendering perf fix can be baselined and A/B'd with numbers instead of eyeballing.

Adds:

  • An internal CompositionTarget.FramePresented diagnostics event, raised after the swap chain presents, carrying the recorded frame's sequence number (a repeated sequence means the previous frame was shown again). Costs a null check when unsubscribed.
  • A frame probe + synthetic input drivers in the ScrollSmoothnessTester sample, covering ScrollViewer and ScrollView tabs across scenarios: wheel-burst, wheel-slow, touchpad, touch-fling, touch-drag, key-down, page-down, changeview, and external (records real OS/finger input).
  • Per-presented-frame metrics: fps vs newFps (distinct frames), frame-interval percentiles (motion-only), long frames, repeated/stalled frames, backward steps, judder (5-frame quadratic residual), maxStep and when it happened, record-to-present latency, first-input latency, host stalls.
  • Unattended runs via sample=Scrolling/ScrollSmoothnessTester&scrollprobe=all&scrolltabs=0,2,3,4,5, printing [scroll-probe] {json}.
  • Two small SamplesApp dev hooks: UNO_SAMPLES_TRACE env var to enable trace-logging categories, and an Android adb shell setprop debug.uno.samples.renderer vulkan|gl|software property to pick the render view for the next launch.

Why is this needed? 🤔

Scroll-smoothness regressions/fixes were previously validated by eye. This gives a repeatable, scriptable measurement used to baseline and compare fixes across Win32, WASM (desktop Chrome, Edge on Android), Android (Pixel Tablet 60 Hz, Galaxy Z Fold7 120 Hz, Vulkan and GL), macOS and iOS (iPhone 13 Pro 120 Hz).

Renderer 🎨

  • Skia
  • Native

For which platforms 📱💻🖥️

All platforms 🌍

Any feedback? 💬

Test infrastructure only (SamplesApp + an internal CompositionTarget diagnostics event); no public API surface change. Related: #23985.

Activity

  1. added
    kind/enhancement
    triage/untriaged
    on Sep 25, 2026
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/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions