Perform AnimationEndSync commits on the React revision (#57493)#57493
Open
j-piasecki wants to merge 1 commit into
Open
Perform AnimationEndSync commits on the React revision (#57493)#57493j-piasecki wants to merge 1 commit into
j-piasecki wants to merge 1 commit into
Conversation
|
@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111219420. |
Summary:
Changelog: [General][Fixed] Perform AnimationEndSync commits on the React revision
```
AB Merge
UI thread -----------*----------*------------
JS thread ---*------------*------------------
React abFlush
```
In this scenario:
- AB - Animation Backend update
- React - React commit
- Merge - Merge commit
- abFlush - Animation Backend [flush](https://www.internalfb.com/code/fbsource/[aecb908843884d2fe57e866611a468e47b36518b]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp?lines=242-268)
1. React revision captures the currently mounted main revision and applies the update on top of it. The result becomes the new `reactRevision`.
2. Animation Backend performs updates on the mounted tree, and requests a flush
3. The flush runs on the JS thread, clearing the `animatedPropsRegistry`
4. Merge commit runs, mounting the `reactRevision` and effectively dropping the updates.
This diff changes the flush to happen on the react revision instead, preventing this from happening.
Differential Revision: D111219420
45c2c03 to
faf25f7
Compare
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.
Summary:
Changelog: [General][Fixed] Perform AnimationEndSync commits on the React revision
In this scenario:
reactRevision.animatedPropsRegistryreactRevisionand effectively dropping the updates.This diff changes the flush to happen on the react revision instead, preventing this from happening.
Differential Revision: D111219420