-
Notifications
You must be signed in to change notification settings - Fork 230
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
Only one asynchronous task per animation can be scheduled #517
Comments
@pontaoski , If you need to generate animation frames for a single resource , then can be done by creating 2 or more animation object with same resource and request different non-overlapping frames from respective animation object. Just curious do you have any usecase where you need more than one frame at a time ? |
I'm using rlottie to implement showing lottie images in a GUI app; the toolkit has an API for animated image formats that consists of essentially What I was hoping to do was something along the lines of this in the
so that I could queue up all the frames to render in the background, only needing to block to wait on a future if the toolkit requests a specific frame from the image with |
@pontaoski , I will do something like this below. loadImage() imageForFrame( reqId ) but then it all depends what the request pattern from the Uitoolkit does it needs all the frames at one time or 1 frame at a time. |
there's no way to "cancel" a pending render, right? so i would need a second animation for the case when the toolkit requests a frame that isn't what's being rendered |
The documentation doesn't mention this, so it seems like you should be able to schedule as many tasks as you want for a single animation. However, trying to do so results in a crash, and looking at the source reveals that the animation can only hold one async task at a time.
The text was updated successfully, but these errors were encountered: