Repository navigation
Adapt mobile rendering to GPUI frame demand - #897
Merged
Merged
Conversation
1 task
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.
Summary
Mobile rendering now follows GPUI demand instead of continuously ticking on iOS or drawing on arbitrary Android looper wakes.
The shared Rust
FramePacerowns demand coalescing, touch activity and grace. iOS enables ProMotion, reads the attached screen, recreates its display link on screen/scene changes, reports refresh timing through FFI, and connectsframe_waker/schedule_frame. Android uses coalesced Choreographer callbacks, reports compatible maximum refresh, suspends on activity pause, and uses API-gatedSurface.setFrameRatehints. System power and thermal policy can clamp both.No gpui-fast patch or desktop change. In locked upstream 0.1.8, Wayland parks its idle frame loop; macOS retains a visible-window display-link subscription, Windows invalidates windows from its VSync thread, and X11 keeps a visible-window refresh timer. GPUI skips unchanged rendering on those periodic callbacks, but they are not all fully on-demand frame sources.
Evidence
After: invalidation explicitly wakes the native frame source; isolated refreshes pause again, continuing animations/input retain max-rate scheduling, and both backends expose display refresh timing.
-D warnings, workspace nextest--test-threads 4(1,245 passed, 13 existing skips), iOS device Release Rust build and warnings-denied device check, warnings-denied Android check with NDK 27.1.12297006/API 26, warnings-denied Web check, machete, Android Release Java compilation, andgit diff --check.blockfuture-compatibility notice; macOS test linking reports a large unwind table; Gradle reports existing deprecations. No check failed on the final implementation.121195a6db7113a4d195994f3e1bea741530817aon iPhone Air00008150-0000459402D2401C: Rust Release + Xcode Release, unchangedcom.tryanks.tcode, team9865JAS8C7.devicectlreported successful installation; the app was not automatically launched or driven. The final executable contains no temporary adaptive-refresh instrumentation markers.Merge Danger
Door: two-way
Blast Radius: mobile
Frame-source lifecycle and wake delivery change on iOS and Android. Rust policy and cross-target compilation pass; native smoothness and power behavior remain for the maintainer to try by hand. No schema, protocol or bundle-id changes.