Allow for not advancing state machine and flushing every frame#614
Draft
tamirh wants to merge 5 commits intorive-app:masterfrom
Draft
Allow for not advancing state machine and flushing every frame#614tamirh wants to merge 5 commits intorive-app:masterfrom
tamirh wants to merge 5 commits intorive-app:masterfrom
Conversation
When dirtyTrackingEnabled is true, _paintShared() skips the expensive clear→paint→flush cycle on frames where no painter called markDirty(). Defaults to false so upstream behavior is preserved unless opted in.
Upstream LFS objects aren't replicated to the fork. This config prevents LFS smudge failures during flutter pub get.
The ticker keeps running every frame (frameCallback → schedulePaint), but the state machine only advances when enough wall-clock time has accumulated (advanceInterval). This avoids the deadlock where _paintShared skipped everything when not dirty, which prevented paintIntoSharedTexture from being called, which prevented the advance, which prevented markDirty. Flow: - frameCallback accumulates elapsedSeconds each tick - When accumulated >= advanceInterval, marks texture dirty - _paintShared runs full cycle only on dirty frames - paintIntoSharedTexture receives accumulated elapsed time so the controller gets the correct wall-clock delta
The SDK no longer needs to know about throttle intervals. Instead, SharedRenderTexture exposes a generic onFrameTick callback that the render object calls each frame with elapsedSeconds. App code wires its own timing logic to call markDirty() when an advance is needed.
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.
To Write...