Skip to content
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 jump if optimised appear animation is interrupted #2661

Merged
merged 3 commits into from
May 15, 2024

Conversation

mattgperry
Copy link
Collaborator

@mattgperry mattgperry commented May 14, 2024

If a large amount of work is performed between a deferred animation starting and keyframe resolution, there can be a perceptible jump in interrupted optimised animations. This PR fixes that by deferring cancellation until the following frame.

@mattgperry mattgperry requested a review from shuangq May 14, 2024 14:10
Copy link
Contributor

@shuangq shuangq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ❤️

Comment on lines 80 to 81
* By blocking the main thread here, we ensure that
* the keyframes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is incomplete...?

Comment on lines +39 to +40
* If we've been provided the frameloop as an argument, use it to defer
* cancellation until keyframes of the subsequent animation have been resolved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also elaborate a bit why we need to defer the cancellation?

@mergetron mergetron bot removed the autorebasing label May 15, 2024
@mergetron mergetron bot force-pushed the fix/optimized-appear branch from cad2dbd to 8e5efef Compare May 15, 2024 15:26
@mergetron mergetron bot merged commit 0756e52 into main May 15, 2024
1 check passed
@mergetron mergetron bot deleted the fix/optimized-appear branch May 15, 2024 15:28
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.

2 participants