fix: use common Flutter render pipeline on Linux - #254
Closed
local-sandbox-agent[bot] wants to merge 3 commits into
Closed
fix: use common Flutter render pipeline on Linux#254local-sandbox-agent[bot] wants to merge 3 commits into
local-sandbox-agent[bot] wants to merge 3 commits into
Conversation
local-sandbox-agent
Bot
force-pushed
the
asb/fix-flutter-synced-frame-hook
branch
from
August 20, 2026 00:55
ee1e5fd to
d154a4f
Compare
nmfisher
force-pushed
the
asb/fix-flutter-synced-frame-hook
branch
2 times, most recently
from
August 20, 2026 05:05
9e85c4c to
cf87074
Compare
nmfisher
force-pushed
the
asb/fix-flutter-synced-frame-hook
branch
from
August 20, 2026 05:14
cf87074 to
cdf81ef
Compare
nmfisher
force-pushed
the
asb/fix-flutter-synced-frame-hook
branch
from
August 22, 2026 10:20
e538a0c to
4b8b211
Compare
Run Dart request-frame hooks for native-admitted Linux frames while keeping Flutter-synchronized timing, admission, pause/resume, and persistent callback ownership inside FrameScheduler. Gate native requests while a Dart callback is in flight and reuse the persistent callback across restarts.
nmfisher
force-pushed
the
asb/fix-flutter-synced-frame-hook
branch
from
August 23, 2026 04:25
4b8b211 to
f06372c
Compare
Owner
|
Closing this sandbox-app-authored PR so it can be replaced by an equivalent PR authored directly by @nmfisher. The branch and commits are unchanged. |
Owner
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.
Problem
Linux takes its frame timing from Flutter's
SchedulerBinding, but the Flutter-synchronized path also bypassed the normal Dart render callback and rendered directly in native code. That meantFilamentApp.render()did not run, so Dart request-frame hooks such as camera controllers and procedural updates were skipped.The separate native render path was not required by Flutter or Filament; only the Linux frame source and external-texture notification need to be platform-specific.
Structure
FrameSchedulercontinues to own frame timing for every native platform:All three modes now dispatch the same Dart frame handler. On Linux, Flutter's persistent frame callback applies the target-FPS deadline and the common in-flight guard, then dispatches the same
_renderFrame()handler as the native display-link modes.That common callback:
FilamentApp.render()Linux keeps one presentation-specific optimization: after the common render future completes, a direct FFI call marks all registered Linux external textures available. Texture notification remains separate from scheduling and rendering.
The hooks-only callback and the separate native Linux render path have been removed. Non-Linux scheduling behavior is unchanged.
The native
FrameSchedulerAPI is now timing-only. Its C++ and C interfaces use tick terminology, and the C entry point is explicitly namedFrameScheduler_startWithCallback. The unused rendering API and its global render state were deleted:FrameScheduler_setRenderThreadFrameScheduler_setRenderManagerFrameScheduler_setPostRenderCallbackFrameScheduler_requestRenderFrameScheduler_startNativeRenderLoopDart now distinguishes incoming platform ticks from dispatched frame handlers (
setFrameHandler,_tryDispatchFrame, anddispatchedFrameCount).Validation
flutter analyzeinthermion_flutter: no issuesthermion_fluttertest suite: 29 tests passedgit diff --check: passed