Skip to content

feat(layers): compile scroll layers in on macOS and iOS - #9

Merged
trancong12102 merged 1 commit into
mainfrom
scroll-layers-apple
Oct 1, 2026
Merged

trancong12102 merged 1 commit into
mainfrom
scroll-layers-apple

Conversation

@trancong12102

Copy link
Copy Markdown

Sets fast::layers::COMPILED for macos and ios, which share gpui_apple's Metal renderer. Linux stays out, because our gpui_wgpu renderer is zed's and has no frame recording.

Until now layers were kept off on Apple because Slopty's two scrolled lists never composited a frame. The three causes have been fixed outside this fork (Slopty's navigator, and aislopware/gpui-kit#3), plus #8 here. With them, measured in Slopty as the median of 8 alternating rounds, layers compiled in against GPUI_SCROLL_LAYERS=0:

  • Navigator scrolling: 0.343 ms to 0.234 ms a frame, with 600 of 600 frames composited.
  • Finished conversation panned at rest: 0.5245 ms to 0.4325 ms, with 393 of 600 composited. The rest of the frames fall while the composer's 200 ms morph runs on the wall clock.
  • Everything else (streaming face, terminal, chrome, palette, pointer, echo): within noise.

Checks:

  • cargo test -p gpui_apple --lib fast::layers: 12 pass. These are the Metal composite pixel tests.
  • cargo check -p gpui_ios --target aarch64-apple-ios-sim: passes.
  • script/check-upstream: 0 violations.
  • Slopty tests that a navigator scroll and a face pan composite land with the pin move.

SLOPTY.md's "Scroll layers" section is updated to match.

Both share gpui_apple's Metal renderer, whose tile path the pixel tests in
`cargo test -p gpui_apple fast::layers` already check. Linux stays out, as
our gpui_wgpu renderer is zed's without the frame recording layers need.

Slopty's two scrolled lists now composite: the navigator at 600 of 600 wheel
frames, 0.343 to 0.234 ms a frame, and a finished conversation panned at
rest at 393 of 600, 0.5245 to 0.4325 ms. Nothing else moves outside the
noise (SLOPTY.md, "Scroll layers").

Co-Authored-By: Claude Code
@trancong12102
trancong12102 merged commit f71b3fe into main Oct 1, 2026
4 checks passed
trancong12102 added a commit to aislopware/slopty that referenced this pull request Oct 1, 2026
gpui-fast moves to f71b3fe. It compiles scroll layers in on macOS and
iOS (aislopware/gpui-fast#9), and it fixes the overflow in a list layer's
shift when the view holding the list is copied from the last frame (#8).
gpui-kit moves to 25b62b08, whose text view no longer changes its state
when it is first built (aislopware/gpui-kit#3).

Navigator scrolling goes from 0.343 to 0.221 ms a frame, with every
frame composited. A finished conversation panned at rest goes from 0.479
to 0.4215 ms. Every other frame stays within noise. Two tests assert that
both lists composite every frame and are never demoted.

Co-Authored-By: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant