Skip to content

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

Draft
tamirh wants to merge 10 commits into
rive-app:masterfrom
ElloTechnology:ello
Draft

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

Conversation

@tamirh
Copy link
Copy Markdown

@tamirh tamirh commented Feb 27, 2026

To Write...

tamirh added 6 commits May 11, 2026 15:38
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.
Adds riveAdvanceProfilingEnabled flag and Stopwatch-based
instrumentation to RiveWidgetController.advance(). When enabled,
emits Timeline.instantSync events with artboard name, advance
duration (us), and whether the state machine changed.
tamirh added 4 commits May 11, 2026 15:40
fetchexclude alone only filters `lfs fetch`; checkout still triggers
smudge which fails because the bare cache lacks LFS objects (forked test
assets aren't shipped to GitHub LFS). Override the smudge filter so pub
clones of this ref succeed without GIT_LFS_SKIP_SMUDGE=1.
LFS-tracked test assets aren't shipped to GitHub LFS, so smudge during
`pub get` checkout fails ('remote missing object'). `.lfsconfig` only
takes effect after checkout, not during it.

Removing the LFS rule from .gitattributes makes the pointer files
check out as plain (128-byte) blobs. Client doesn't consume the rive
package's tests, so the pointer-only test assets are harmless.
This .riv file is only a 128-byte LFS pointer (real content never
pushed to GitHub LFS). `pub get` fails because `git clone` of the
bare pub cache checks out the upstream HEAD with LFS rules before
landing on our ref, triggering smudge on a missing remote object.

The asset is only consumed by rive package's own tests, which we don't
run from the client.
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