gallery/vendor/i-slint-renderer-skia/Cargo.toml.orig
Greg Pomerantz 93b27d724b Root-cause and fix the Mali scroll jank; strip jank-hunt instrumentation
The 19-26 ms mid-scroll stalls (Mali-only, fixed content offsets) were
the Skia renderer's final synchronous GrDirectContext::flush() blocking
the UI thread on Mali driver back-pressure — proven by per-stage
timestamps in the vendored renderer (stall frames: flush 19-24 ms,
walk 1-3 ms, 1 binding re-eval, image imports 0.1 ms each).

- vendor/i-slint-renderer-skia (pinned 1.18.1, [patch.crates-io]):
  remove that one flush. Redundant on the wgpu backend: the surface
  already calls flush_and_submit before queue.present, same Vulkan
  queue, in-order. Phone: 0 stalls across 4 runs (max 3.6-7.4 ms vs
  the 8.3 ms budget), display verified clean.
- docs/BUGS/slint-skia-final-flush-jank.md: full evidence, prior art
  (slint-ui/slint#12030 closest), open question for a future
  upstream filing (not filed yet).
- Profiling also retired the O(n)-walk theory: Slint 1.18 prunes the
  item walk to ~133-152 items; the windowed Flickable built on that
  theory was already reverted (ListView is smooth with the fix).
- Strip all jank-hunt instrumentation: FR/SCR/TICK/APLYD/STG logging,
  stg markers, .gallery_* file knobs, jsamp thread sampler,
  DbgScroll programmatic scroll, nblog perf-file mirroring.
  Also fixes the 'launches into unstoppable fast scroll' bug: a
  leftover .gallery_cmd was re-read on every launch (file never
  deleted) and overrode user swipes — the hook is gone.
- Keep: nblog (logd backpressure is real), zero-dimension decode
  guards, keep-alive (default-off).
- HANDOFF: replace stale windowed-Flickable section with the actual
  root cause/fix; 15 unit tests pass.

Verified on phone (aarch64, 8580 photos) and emulator (x86_64).
2026-10-28 18:23:50 -04:00

118 lines
5.3 KiB
TOML

# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
# cSpell: ignore CFCG
[package]
name = "i-slint-renderer-skia"
description = "Skia based renderer for Slint"
authors.workspace = true
edition = "2024"
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
build = "build.rs"
[lib]
path = "lib.rs"
# Note, these features need to be kept in sync (along with their defaults) in
# the C++ crate's CMakeLists.txt
[features]
wayland = ["glutin/wayland", "softbuffer/wayland", "softbuffer/wayland-dlopen"]
x11 = ["glutin/x11", "glutin/glx", "softbuffer/x11", "softbuffer/x11-dlopen"]
opengl = []
# `vulkan-portability` is how wgpu compiles its Vulkan backend on Apple platforms (MoltenVK).
# It feeds an apple-target-gated dependency of wgpu-core, so it's inert elsewhere.
vulkan = [
"skia-safe/vulkan",
"wgpu-30",
"wgpu-30/vulkan",
"wgpu-30/vulkan-portability",
"wgpu-29?/vulkan",
"wgpu-29?/vulkan-portability",
]
kms = ["softbuffer/kms"]
# wgpu-{29,30} enables the wgpu surface module for internal use (e.g. linuxkms DRM rendering), as well as
# the explicit graphics APIs: Direct3D 12 on Windows, Metal on Apple, Vulkan on apple and other unix
wgpu-29 = ["i-slint-core/wgpu-29", "dep:wgpu-29", "dep:spin_on", "dep:windows-core", "dep:wgpu-hal-29"]
unstable-wgpu-29 = ["i-slint-core/unstable-wgpu-29", "wgpu-29"]
wgpu-30 = ["i-slint-core/wgpu-30", "dep:wgpu-30", "dep:spin_on", "dep:windows-core", "dep:wgpu-hal-30"]
unstable-wgpu-30 = ["i-slint-core/unstable-wgpu-30", "wgpu-30"]
default = ["softbuffer", "wgpu-30"]
[dependencies]
i-slint-core = { workspace = true, features = ["default", "box-shadow-cache", "shared-parley", "image-decoders", "svg"] }
i-slint-core-macros = { workspace = true, features = ["default"] }
i-slint-common = { workspace = true, features = ["default"] }
const-field-offset = { version = "0.2.1", path = "../../../helper_crates/const-field-offset" }
vtable = { workspace = true }
cfg-if = "1"
lyon_path = { workspace = true }
pin-weak = "1"
scoped-tls-hkt = "0.1"
raw-window-handle = { version = "0.6", features = ["std"] }
clru = { workspace = true }
skia-safe = { version = "0.153.3", features = ["gl"] }
glow = { workspace = true }
unicode-segmentation = { workspace = true }
wgpu-29 = { workspace = true, optional = true }
wgpu-30 = { workspace = true, optional = true }
spin_on = { version = "0.1", optional = true }
[target.'cfg(any(not(target_vendor = "apple"), target_os = "macos"))'.dependencies]
glutin = { workspace = true, default-features = false, features = ["egl", "wgl"] }
[target.'cfg(not(target_os = "android"))'.dependencies]
# software renderer fallback
softbuffer = { workspace = true, default-features = false, optional = true }
bytemuck = { workspace = true }
[target.'cfg(target_family = "windows")'.dependencies]
windows = { workspace = true, features = ["Win32", "Win32_Graphics", "Win32_Graphics_Dxgi", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D", "Win32_Foundation", "Win32_Graphics_Dxgi_Common"] }
windows-core = { workspace = true, optional = true }
skia-safe = { version = "0.153.3", features = ["d3d"] }
wgpu-29 = { workspace = true, optional = true, features = ["dx12"] }
wgpu-30 = { workspace = true, optional = true, features = ["dx12"] }
[target.'cfg(target_vendor = "apple")'.dependencies]
objc2 = { version = "0.6.0" }
objc2-metal = { version = "0.3.2", default-features = false, features = ["std", "MTLCommandQueue", "MTLCommandBuffer", "MTLDevice", "MTLResource", "MTLTexture", "MTLTypes"] }
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSGeometry"] }
objc2-quartz-core = { version = "0.3.2", default-features = false, features = ["std", "objc2-metal", "CALayer", "CAMetalLayer", "objc2-core-foundation"] }
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSResponder", "NSView"] }
objc2-core-foundation = { version = "0.3.2", default-features = false, features = ["CFCGTypes"] }
skia-safe = { version = "0.153.3", features = ["metal"] }
wgpu-29 = { workspace = true, optional = true, features = ["metal"] }
wgpu-30 = { workspace = true, optional = true, features = ["metal"] }
# Version floor for `metal::Queue::as_raw` (used in wgpu_29_surface/metal.rs),
# which was added in wgpu-hal 29.0.4. Enabled by the `wgpu-29` feature; only
# declared here (Apple) because that is the only target using the API.
wgpu-hal-29 = { workspace = true, optional = true }
wgpu-hal-30 = { workspace = true, optional = true }
read-fonts = { workspace = true }
# Pinned to 0.50 to align with read-fonts from parley and avoid duplicated dependencies
write-fonts = { version = "0.50" }
[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies]
skia-safe = { version = "0.153.3", features = ["gl", "vulkan"] }
wgpu-29 = { workspace = true, optional = true, features = ["vulkan"] }
wgpu-30 = { workspace = true, optional = true, features = ["vulkan"] }
[target.aarch64-apple-ios-sim.dependencies]
# Disabling encoding assertions until https://github.com/madsmtm/objc2/issues/795 is fixed.
objc2 = { version = "0.6.0", features = ["disable-encoding-assertions"] }
[build-dependencies]
cfg_aliases = { workspace = true }
[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]