Course correct props at SurfaceMountingManager.updateProps()#53589
Course correct props at SurfaceMountingManager.updateProps()#53589zeyap wants to merge 2 commits into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
d0b7a1a to
d7c8b22
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
d7c8b22 to
7e1cb92
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
0d9f11b to
985255b
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
02f27a9 to
9db781f
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
9db781f to
846305e
Compare
846305e to
3ed0b7d
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
3ed0b7d to
1b2da2e
Compare
1b2da2e to
c205e9a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
ebab9cf to
69a50d4
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
69a50d4 to
bb48657
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
bb48657 to
4b00af9
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
4b00af9 to
bcb8852
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
bcb8852 to
5dd4b0b
Compare
Differential Revision: D81690079
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
5dd4b0b to
05585ec
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
05585ec to
b8d4e62
Compare
…k#53589) Summary: Pull Request resolved: facebook#53589 ## Changelog: [Android] [Changed] - [c++ animated] Course correct props at SurfaceMountingManager.updateProps() Sometimes a React update will try to commit to the same view that native animated modified before via direct manipulation, and after the update host view will use the prop value currently in Fabric. In `AnimatedMountingOverrideDelegate` there's logic to course correct at ShadowTree mount, but if this update is from JS thread, it takes some time to reach mounting layer, at the same time UI thread can still be doing more direct animation updates, and once the corrected change gets there it's already stale. In this diff I added mechanism to keep track of direct manipulation props (or "synchronous mount props" to match the naming of java function `synchronouslyUpdateView...`) and use it to correct what reaches host view. `SurfaceMountingManager.updateProps()` is called by both regular mount and direct manipulation and it's always called on UI thread, so it could be a good candidate to synchronize these 2 scenarios Reviewed By: sammy-SC Differential Revision: D81611823
|
This pull request was exported from Phabricator. Differential Revision: D81611823 |
b8d4e62 to
416a171
Compare
|
This pull request has been merged in dae2f60. |
Summary:
Changelog:
[Android] [Changed] - [c++ animated] Course correct props at SurfaceMountingManager.updateProps()
Sometimes a React update will try to commit to the same view that native animated modified before via direct manipulation, and after the update host view will use the prop value currently in Fabric. In
AnimatedMountingOverrideDelegatethere's logic to course correct at ShadowTree mount, but if this update is from JS thread, it takes some time to reach mounting layer, at the same time UI thread can still be doing more direct animation updates, and once the corrected change gets there it's already stale.In this diff I added mechanism to keep track of direct manipulation props (or "synchronous mount props" to match the naming of java function
synchronouslyUpdateView...) and use it to correct what reaches host view.SurfaceMountingManager.updateProps()is called by both regular mount and direct manipulation and it's always called on UI thread, so it could be a good candidate to synchronize these 2 scenariosDifferential Revision: D81611823