gallery/vendor/i-slint-backend-android-activity-1.18.1
Greg Pomerantz 01c15795ff 2ms poll cap during active scroll + record_check.py (display-side referee)
2ms cap (vendor backend): the residual 8/1266 phone slip-frames all
correlated with polls that ran 5.5-10.7ms despite the 6ms cap
(ALooper_pollOnce(6) returns 2-5ms LATE on this device — the delay is
inside kernel/epoll; vsw=nvol=0 on every slip iteration, so the UI
thread was never descheduled mid-iteration). A 2ms cap bounds the
damage of a lost/late wake: the next poll picks up the pending edge
within 2ms → render start edge+2-3ms → present inside the slot.
Emulator A/B (2 vs 6ms): no difference (5-8 drops/capture both ways,
vs 47-147 for the pre-evfd build) — the evfd wake-fd fix dominates;
the shorter cap is kept.

tools/record_check.py: the DISPLAY-side referee. jank_capture judges
the app's self-report; this records the actual display output with
`adb shell screenrecord` (30 Mbps) during scripted (or hand) drags and
measures inter-frame gaps in the mp4:
  * median refresh period is computed from ACTIVE-WINDOW gaps only —
    rest periods emit idle frames at irregular 20-100ms intervals that
    would pollute the reference (found during validation)
  * active windows come from real wall-clock drag times (1.5s pad)
  * verdict: CLEAN (0 gaps >1.8x med), SUSPECT (1.25-1.8x), JANK
  * selftest: 4 cases incl. drop-in/outside-active-window + real
    ffmpeg 120fps mp4 through the ffprobe pipeline
Validated end-to-end on the emulator (record → drags → pull → analyze).
When the phone is free: one `record_check.py record --app wow.gmp.sltest
--drags 4,2,4` run gives the visual-certain answer the user asked for —
did the glass actually show every frame?
2026-10-30 16:40:09 -04:00
..
java Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
LICENSES Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
.cargo_vcs_info.json Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
.cargo-ok Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
androidwindowadapter.rs Fix 120Hz scroll jank end-to-end: render-ahead present + full-cache eviction off the UI thread 2026-10-30 02:49:23 -04:00
build.rs Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
Cargo.lock Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
Cargo.toml 120Hz: fix the ALooper wake-fd race (root cause of slot drops) + phase-slip-robust referee 2026-10-30 16:08:48 -04:00
Cargo.toml.orig Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
javahelper.rs Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
lib.rs 2ms poll cap during active scroll + record_check.py (display-side referee) 2026-10-30 16:40:09 -04:00
README.md Jank-hunt perf feature: FR/STG/DECODE instrumentation, off by default 2026-10-29 08:11:51 -04:00
stg.rs 120Hz: Choreographer chain self-sustains on (animating||dirty); EW gates the wake; MISS v2 forensics; ctxsw discriminator + present CPU split 2026-10-30 14:51:06 -04:00
vsync.rs 120Hz: fix the ALooper wake-fd race (root cause of slot drops) + phase-slip-robust referee 2026-10-30 16:08:48 -04:00

NOTE: This library is an internal crate of the Slint project.

WARNING: This crate does not follow the semver convention for versioning and can only be used with version = "=x.y.z" in Cargo.toml.

Slint Android Activity Backend

This crate implements the Android backend/platform for Slint.

It uses the android-activity crate to initialize the app and provide events handling.

It can be used by using functions from the slint::android module