Commit 6529383
Always flush in NativeAnimatedTurboModule
Summary:
## Summary
In the past, NativeAnimatedModule could animate **both** Paper **and** Fabric components.
For Fabric nodes, we needed to manually flush NativeAnimatedModule's operations queue. So, we started tracking which nodes were Fabric owned in NativeAnimatedModule.
## Changes
With bridgeless mode, all components must be Fabric-owned. So, should be able to remove this fabric ownership tracking logic and **always flush.**
## Is this safe?
In the worst case, we over-flush. This doesn't seem bad. cc sammy-SC.
## Do we still need flushing?
Arguably, all this manual flushing should be unnecessary, because we already migrated AnimatedModule's Paper integration to RCTSurfacePresenterObserver, here: D14336760 (544d9fb). So, do we still need this flushing?
Yes. Here's what happens when you disable all the manual flushing in bridgeless mode: https://pxl.cl/2dqPf.
Long-term, we need to re-think this operations queuing in NativeAnimatedTurboModule. I left my thoughts in T130668424 (Investigation - Day 5).
Changelog: [Internal]
Reviewed By: p-sun
Differential Revision: D39592477
fbshipit-source-id: e971edc0d99661a37b5f430bce46c78acaa121c01 parent 6ba5fa9 commit 6529383
1 file changed
+2
-20
lines changedLines changed: 2 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
| |||
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
46 | | - | |
47 | | - | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
| |||
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 111 | | |
120 | 112 | | |
121 | 113 | | |
| |||
138 | 130 | | |
139 | 131 | | |
140 | 132 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 133 | + | |
146 | 134 | | |
147 | 135 | | |
148 | 136 | | |
149 | 137 | | |
150 | 138 | | |
151 | 139 | | |
152 | 140 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 141 | + | |
156 | 142 | | |
157 | 143 | | |
158 | 144 | | |
| |||
192 | 178 | | |
193 | 179 | | |
194 | 180 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | 181 | | |
199 | 182 | | |
200 | 183 | | |
| |||
296 | 279 | | |
297 | 280 | | |
298 | 281 | | |
299 | | - | |
300 | 282 | | |
301 | 283 | | |
302 | 284 | | |
| |||
0 commit comments