Commit aa62a5e
committed
Send layout events on shadow queue
Summary:
We currently wait until after views have been updated on the main thread before sending layout events. This means that any code that relies on those events to update the UI will lag the atual layout by at least one frame.
This changes the RCTUIManager to send the event immediately after layout has occured on the shadow thread. This noticably improves the respinsiveness of the layout example in UIExplorer, which now updates the dimension labels immediately instead of waiting until after the layout animation has completed.1 parent f28255e commit aa62a5e
3 files changed
Lines changed: 22 additions & 24 deletions
File tree
- Examples/UIExplorer
- Libraries/Components/View
- React/Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | 451 | | |
453 | 452 | | |
454 | 453 | | |
455 | 454 | | |
456 | 455 | | |
457 | 456 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | 457 | | |
475 | 458 | | |
476 | 459 | | |
| |||
486 | 469 | | |
487 | 470 | | |
488 | 471 | | |
489 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
490 | 486 | | |
491 | 487 | | |
492 | 488 | | |
| |||
497 | 493 | | |
498 | 494 | | |
499 | 495 | | |
500 | | - | |
501 | 496 | | |
502 | 497 | | |
503 | 498 | | |
| |||
506 | 501 | | |
507 | 502 | | |
508 | 503 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | 504 | | |
513 | 505 | | |
514 | 506 | | |
| |||
0 commit comments