-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: corrected thorvg canvas sync #222
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might need to double-check whether it works correctly if removing viewport call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @tinyjin, it works perfectly 🚀
Thanks @theashraf, ThorVG team also on reviewing some internal thing, changed to DRAFT. �I'll soon let u know when it's ready. |
afb08ed
to
de78bd2
Compare
@theashraf Updated logic more properly, please check again :) Note that result of |
Ensure `thorvg_canvas_sync` is called before buffer changes. Additionally, the function should not disrupt subsequent code execution, regardless of its return value. Call the function without using the Rust try operator (`?`). Issue: LottieFiles#206
de78bd2
to
c4b917d
Compare
Ensure
thorvg_canvas_sync
is called in correct way, before buffer changes.Essentially
thorvg_canvas_sync()
shouldn't interrupt following code lines, regardless of it's return value.See the good example:
https://github.com/thorvg/thorvg/blob/main/src/bindings/wasm/tvgWasmLottieAnimation.cpp#L287
Corrected the function in fire-and-forget pattern.
Previously,
lotte_renderer
handle the InsufficientCondition(status == Status::Synced
) as an error and block next steps inresize()
function. (fell in thatset_target
,compute_layout
never happend)We shouldn't handle the
status == Synced
case as an error. Corrected thesync()
without using the Rust try operator (?
)[Before]
CleanShot.2024-08-29.at.23.13.24.mp4
[After]
CleanShot.2024-08-29.at.23.08.37.mp4