Commit bc35c91
authored
Fix race conditions in MetalRedrawer (#2672)
Await when all scheduled tasks in async rendering queue are completed
before clearing resources.
Move surface and renderTarget closing to the critical section.
Fixes:
https://youtrack.jetbrains.com/issue/CMP-8144/Crash-when-enabling-parallel-rendering-in-MetalRedrawer-for-iOS
Fixes:
https://youtrack.jetbrains.com/issue/CMP-7598/Skia-crash-on-iOS-GrResourceCachenotifyARefCntReachedZero
## Release Notes
### Fixes - iOS
- Fix the crash that may occur when the Compose container disposes.1 parent 318724b commit bc35c91
File tree
1 file changed
+11
-3
lines changed- compose/ui/ui/src/iosMain/kotlin/androidx/compose/ui/window
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| |||
431 | 439 | | |
432 | 440 | | |
433 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
434 | 445 | | |
435 | 446 | | |
436 | 447 | | |
| |||
470 | 481 | | |
471 | 482 | | |
472 | 483 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | 484 | | |
477 | 485 | | |
478 | 486 | | |
| |||
0 commit comments