Repository navigation
Bump gpui-pre to 0.3.8 - #28
Closed
madcodelife wants to merge 1 commit into
Closed
madcodelife wants to merge 1 commit into
madcodelife wants to merge 1 commit into
Conversation
- Bump the pinned `gpui-pre` / `gpui-pre-wgpu` / `gpui-pre-reqwest-client`
deps (lib + example) from `=0.3.7` to `=0.3.8`, and move the example's
`gpui-kit` rev to v0.7.1 (`87d10ae`), which is built on gpui-pre 0.3.8.
- Fill the new `RequestFrameOptions::signal_at` / `signal_source` fields.
They record when the platform first asked for a frame and whether the
request came from the OS (`NativeCallback`) or from the backend's own
scheduling (`LocalSchedule`); GPUI's frame profiler uses them to measure
the delay between a frame request and its handling.
- Android: `FramePacer` remembers why each frame became due. A vsync is a
`NativeCallback` stamped with the `AChoreographer` frame time (converted
from `CLOCK_MONOTONIC` to an `Instant` on the vsync thread, only when
GPUI's `profiler` feature is on, as the desktop backends do); demand the
pacer serves at once or by its fallback clock is a `LocalSchedule`. The
window's frame callback drains it through `frame_source::take_signal`.
- iOS: `gpui_ios_request_frame` runs inside the host's `CADisplayLink`
callback, so it reports a `NativeCallback` stamped on entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Duplicate of #27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
gpui-pre/gpui-pre-wgpu/gpui-pre-reqwest-clientdeps (lib + example) from=0.3.7to=0.3.8, the same way Bump gpui-pre to 0.3.7 #21 did the previous bump.gpui-kitrev from2ec5696(on gpui-pre 0.3.7) to v0.7.1 (87d10ae, on gpui-pre 0.3.8).RequestFrameOptions. Without them the Android build fails withE0063: missing fields signal_at and signal_source.The new fields
signal_atis when the platform first asked for the frame, before main-thread dispatch (Noneif unknown).signal_sourcesays whether the request came from the OS (NativeCallback) or from the backend's own scheduling: a timer, retry, or fallback sleep (LocalSchedule). GPUI's frame profiler uses them to measure how long a frame request waits before it is handled. The desktop backends capture the timestamp only with GPUI'sprofilerfeature on, throughPlatformFrameSignal, and they use the OS vsync time where they have one (theCVDisplayLinktimestamp, the Wayland frame-callback time).Android:
FramePacernow records why each frame became due:NativeCallback, stamped with theAChoreographerframe time. The vsync thread converts that time fromCLOCK_MONOTONICto anInstantand hands it to the loop through aPlatformFrameSignal, so the conversion only runs when profiling. It falls back to the callback's arrival time if the timestamp is implausible, for example when a 32-bitlongtruncates it.LocalSchedule, stamped when the pacer let it through.LocalSchedule, stamped with the deadline it waited for.The window's frame callback drains this through
frame_source::take_signal. If a frame stays owed, it keeps its first request time.take_signaldeliberately does not pull in a vsync that arrived in the meantime, because that vsync belongs to the next frame.iOS:
gpui_ios_request_frameis called from the host'sCADisplayLinkcallback. It reports aNativeCallbackstamped on entry, which mirrors the macOSdisplay_layerpath.No other 0.3.7 → 0.3.8 API change affects the mobile layers. The new
Platformmethods (request_windowing,set_initial_windowing,set_activation_policy,graphical_environment) all have default implementations.Verified
cargo check --all-targets,cargo test --lib(50 passed, including newFramePacersignal tests) andcargo fmt --all -- --checkon the hostcargo check --target aarch64-apple-ios/aarch64-apple-ios-sim/aarch64-linux-android, for the lib and for the examplecargo checkwith--features gpui/profilerforaarch64-apple-ios-simandaarch64-linux-androidcargo build --lib --target aarch64-linux-androidfor the example (links with NDK r27c)cargo clippyreports nothing new; the warnings it already reported are unchanged and none are on changed lines🤖 Generated with Claude Code