Allow for not advancing state machine and flushing every frame#614
Draft
tamirh wants to merge 10 commits into
Draft
Allow for not advancing state machine and flushing every frame#614tamirh wants to merge 10 commits into
tamirh wants to merge 10 commits into
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.
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.
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.
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...