gallery/vendor/i-slint-renderer-skia/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

325 lines
6.9 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-renderer-skia"
version = "1.18.1"
authors = ["Slint Developers <info@slint.dev>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Skia based renderer 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]
rustdoc-args = ["--generate-link-to-definition"]
[features]
default = [
"softbuffer",
"wgpu-30",
]
kms = ["softbuffer/kms"]
opengl = []
unstable-wgpu-29 = [
"i-slint-core/unstable-wgpu-29",
"wgpu-29",
]
unstable-wgpu-30 = [
"i-slint-core/unstable-wgpu-30",
"wgpu-30",
]
vulkan = [
"skia-safe/vulkan",
"wgpu-30",
"wgpu-30/vulkan",
"wgpu-30/vulkan-portability",
"wgpu-29?/vulkan",
"wgpu-29?/vulkan-portability",
]
wayland = [
"glutin/wayland",
"softbuffer/wayland",
"softbuffer/wayland-dlopen",
]
wgpu-29 = [
"i-slint-core/wgpu-29",
"dep:wgpu-29",
"dep:spin_on",
"dep:windows-core",
"dep:wgpu-hal-29",
]
wgpu-30 = [
"i-slint-core/wgpu-30",
"dep:wgpu-30",
"dep:spin_on",
"dep:windows-core",
"dep:wgpu-hal-30",
]
x11 = [
"glutin/x11",
"glutin/glx",
"softbuffer/x11",
"softbuffer/x11-dlopen",
]
[lib]
name = "i_slint_renderer_skia"
path = "lib.rs"
[dependencies.cfg-if]
version = "1"
[dependencies.clru]
version = "0.6.0"
[dependencies.const-field-offset]
version = "0.2.1"
[dependencies.glow]
version = "0.18"
[dependencies.i-slint-common]
version = "=1.18.1"
features = ["default"]
default-features = false
[dependencies.i-slint-core]
version = "=1.18.1"
features = [
"default",
"box-shadow-cache",
"shared-parley",
"image-decoders",
"svg",
]
default-features = false
[dependencies.i-slint-core-macros]
version = "=1.18.1"
features = ["default"]
default-features = false
# Jank-hunt: Vulkan/wgpu stage timing (see wgpu_30_surface.rs VK_* probes).
[dependencies.log]
version = "0.4"
[dependencies.lyon_path]
version = "1.0"
default-features = false
[dependencies.pin-weak]
version = "1"
[dependencies.raw-window-handle]
version = "0.6"
features = ["std"]
[dependencies.scoped-tls-hkt]
version = "0.1"
[dependencies.skia-safe]
version = "0.153.3"
features = ["gl"]
[dependencies.spin_on]
version = "0.1"
optional = true
[dependencies.unicode-segmentation]
version = "1.12.0"
[dependencies.vtable]
version = "0.5"
[dependencies.wgpu-29]
version = "29.0.4"
optional = true
default-features = false
package = "wgpu"
[dependencies.wgpu-30]
version = "30"
optional = true
default-features = false
package = "wgpu"
[build-dependencies.cfg_aliases]
version = "0.2.2"
[target.aarch64-apple-ios-sim.dependencies.objc2]
version = "0.6.0"
features = ["disable-encoding-assertions"]
[target.'cfg(any(not(target_vendor = "apple"), target_os = "macos"))'.dependencies.glutin]
version = "0.32.0"
features = [
"egl",
"wgl",
]
default-features = false
[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies.skia-safe]
version = "0.153.3"
features = [
"gl",
"vulkan",
]
[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies.wgpu-29]
version = "29.0.4"
features = ["vulkan"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies.wgpu-30]
version = "30"
features = ["vulkan"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(not(target_os = "android"))'.dependencies.bytemuck]
version = "1.13.1"
[target.'cfg(not(target_os = "android"))'.dependencies.softbuffer]
version = "0.4.4"
optional = true
default-features = false
[target.'cfg(target_family = "windows")'.dependencies.skia-safe]
version = "0.153.3"
features = ["d3d"]
[target.'cfg(target_family = "windows")'.dependencies.wgpu-29]
version = "29.0.4"
features = ["dx12"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(target_family = "windows")'.dependencies.wgpu-30]
version = "30"
features = ["dx12"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(target_family = "windows")'.dependencies.windows]
version = "0.62"
features = [
"Win32",
"Win32_Graphics",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Direct3D",
"Win32_Foundation",
"Win32_Graphics_Dxgi_Common",
]
[target.'cfg(target_family = "windows")'.dependencies.windows-core]
version = "0.62.0"
optional = true
[target.'cfg(target_vendor = "apple")'.dependencies.objc2]
version = "0.6.0"
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-app-kit]
version = "0.3.2"
features = [
"std",
"NSResponder",
"NSView",
]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-core-foundation]
version = "0.3.2"
features = ["CFCGTypes"]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-foundation]
version = "0.3.2"
features = [
"std",
"NSGeometry",
]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-metal]
version = "0.3.2"
features = [
"std",
"MTLCommandQueue",
"MTLCommandBuffer",
"MTLDevice",
"MTLResource",
"MTLTexture",
"MTLTypes",
]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-quartz-core]
version = "0.3.2"
features = [
"std",
"objc2-metal",
"CALayer",
"CAMetalLayer",
"objc2-core-foundation",
]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.read-fonts]
version = "0.41"
[target.'cfg(target_vendor = "apple")'.dependencies.skia-safe]
version = "0.153.3"
features = ["metal"]
[target.'cfg(target_vendor = "apple")'.dependencies.wgpu-29]
version = "29.0.4"
features = ["metal"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(target_vendor = "apple")'.dependencies.wgpu-30]
version = "30"
features = ["metal"]
optional = true
default-features = false
package = "wgpu"
[target.'cfg(target_vendor = "apple")'.dependencies.wgpu-hal-29]
version = "29.0.4"
optional = true
default-features = false
package = "wgpu-hal"
[target.'cfg(target_vendor = "apple")'.dependencies.wgpu-hal-30]
version = "30"
optional = true
default-features = false
package = "wgpu-hal"
[target.'cfg(target_vendor = "apple")'.dependencies.write-fonts]
version = "0.50"