Skip to content

2.2.0

@Lakr233 Lakr233 tagged this 11 Aug 08:19
The CADisplayLink never declared a preferredFrameRateRange, so on
ProMotion displays it ran at the system's 60 fps default while native
scrolling ran at 120 — a host mixing both gets visible judder (caught
profiling AirBuild's transcript scroll).

The link now requests 60–120 preferred 120 by default, and the request
is a public, per-instance value: `DisplayLink(preferredFrameRateRange:)`
or the open `preferredFrameRateRange` property, surfaced through the
SwiftUI modifier too. All live instances share one platform link, so the
applied range is the union of every instance's request — one caller
asking for 120 lifts the shared link without slowing anyone else. The
CVDisplayLink path runs at the display's own rate and ignores it.

`DisplayLink` is `open` now, so hosts can subclass and override both the
range and the delegate hookup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Assets 2
Loading