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: move requestAnimationFrame back to Reanimated #6991

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Feb 6, 2025

Summary

I introduced a regression in #6973 by moving JS implementation of requestAnimationFrame to Worklets. Native version of requestAnimationFrame is injected in Reanimated's UIRuntimeDecorator.cpp so requestAnimationFrame must be overwritten in Reanimated, not in Worklets.

Since all the native implementation is in Reanimated and it would be a hard task to extract it right now, I decided to keep it for the time being unless we decide where it should land eventually.

Test plan

The only difference is the lack of batching with my regression introduced. You can console.log(currentCallbacks.length) to see that the batching is restored.

@tjzel tjzel added this pull request to the merge queue Feb 6, 2025
Merged via the queue into main with commit 753464b Feb 6, 2025
17 checks passed
@tjzel tjzel deleted the @tjzel/worklets/move-raf-back-to-reanimated branch February 6, 2025 18:43
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