gallery/vendor/i-slint-backend-android-activity-1.18.1/Cargo.toml
Greg Pomerantz 2f4768f354 Fix 120Hz scroll jank end-to-end: render-ahead present + full-cache eviction off the UI thread
Three root causes, all fixed and verified on the Pixel 9 Pro:

1. Present phase (backend + renderer): VSYNC_LOCKED_RENDER defers the
   render to the vsync wake; RENDER_AHEAD presents the previous frame at
   the start of render() (phase = wake + ~1.1 ms) and holds the new
   frame one slot. Crash fix: a held wgpu frame must be PRESENTED, never
   merely dropped, before the next acquire (AlreadyAcquired panic at
   launch otherwise); discard_pending_frame presents too.

2. Full-res prefetch churn (src/lib.rs): the 8-slot full cache cycled
   through a ~20-cell viewport forever (137 decodes/20 s) and each
   eviction free()'d a 50 MB Vec on the UI thread (20-52 ms CPU spikes,
   ~7/s = the residual SLOWEV NonMain jank). Fix: 60 s tombstone
   cooldown on evicted paths (idle prefetch skips, urgent tap bypasses)
   + off-thread reaper for the freed blobs (insert: 21 ms -> 4 us).

3. (earlier) Skia final flush + Mailbox present mode (vendor, M3).

Instrumentation (all behind --features perf): OTHR/INVK/INVK_TAG/FLCK
lines for cross-thread closure timing and push-site tagging.

Warm measured swipe, 8580-file grid: cadence median 8.33 ms (exact
120 Hz), p99 15.5 ms, 5/552 gaps >16.7 ms (0.9%, max 28.3 ms, zero
>33 ms); PRES phase median ~994 us, zero late frames. Docs updated
(docs/BUGS/scroll-jank-120hz.md, full scorecard + line reference).

Also: vendored i-slint-core + wgpu-hal (vkshim interposition patch),
vkshim profiling tooling, backend made a non-optional dep, debuggable
flag for simpleperf (REMOVE before shipping).
2026-10-30 02:49:23 -04:00

119 lines
3.0 KiB
TOML

# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2024"
rust-version = "1.92"
name = "i-slint-backend-android-activity"
version = "1.18.1"
authors = ["Slint Developers <info@slint.dev>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "OpenGL rendering backend for Slint"
homepage = "https://slint.dev"
readme = "README.md"
license = "GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0"
repository = "https://github.com/slint-ui/slint"
[package.metadata.docs.rs]
targets = [
"aarch64-linux-android",
"armv7-linux-androideabi",
"i686-linux-android",
"x86_64-linux-android",
]
features = [
"native-activity",
"aa-06",
]
rustdoc-args = ["--generate-link-to-definition"]
[features]
aa-05 = [
"android-activity-05",
"ndk-08",
]
aa-06 = [
"android-activity-06",
"ndk-09",
]
game-activity = [
"android-activity-06?/game-activity",
"android-activity-05?/game-activity",
]
native-activity = [
"android-activity-06?/native-activity",
"android-activity-05?/native-activity",
]
unstable-wgpu-29 = ["i-slint-renderer-skia/unstable-wgpu-29"]
unstable-wgpu-30 = ["i-slint-renderer-skia/unstable-wgpu-30"]
[lib]
name = "i_slint_backend_android_activity"
path = "lib.rs"
[build-dependencies.android-build]
version = "0.1.2"
[target.'cfg(target_os = "android")'.dependencies.android-activity-05]
version = "0.5"
optional = true
package = "android-activity"
[target.'cfg(target_os = "android")'.dependencies.android-activity-06]
version = "0.6"
optional = true
package = "android-activity"
[target.'cfg(target_os = "android")'.dependencies.i-slint-common]
version = "=1.18.1"
default-features = false
# Jank-hunt: VSYNC timestamp logging (vsync.rs phase-alignment probes).
[target.'cfg(target_os = "android")'.dependencies.log]
version = "0.4"
[target.'cfg(target_os = "android")'.dependencies.i-slint-core]
version = "=1.18.1"
features = [
"std",
"image-decoders",
"svg",
]
default-features = false
[target.'cfg(target_os = "android")'.dependencies.i-slint-renderer-skia]
version = "=1.18.1"
default-features = false
[target.'cfg(target_os = "android")'.dependencies.jni]
version = "0.22"
[target.'cfg(target_os = "android")'.dependencies.ndk-08]
version = "0.8.0"
features = ["rwh_06"]
optional = true
package = "ndk"
[target.'cfg(target_os = "android")'.dependencies.ndk-09]
version = "0.9.0"
features = ["rwh_06"]
optional = true
default-features = false
package = "ndk"
[target.'cfg(target_os = "android")'.dependencies.raw-window-handle]
version = "0.6"