Skip to content

Allow for not advancing state machine and flushing every frame#614

Draft
tamirh wants to merge 5 commits intorive-app:masterfrom
ElloTechnology:ello
Draft

Allow for not advancing state machine and flushing every frame#614
tamirh wants to merge 5 commits intorive-app:masterfrom
ElloTechnology:ello

Conversation

@tamirh
Copy link

@tamirh tamirh commented Feb 27, 2026

To Write...

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant