Commit 54488e0
committed
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 d9437a3 commit 54488e0
File tree
1 file changed
+11
-3
lines changed- compose/ui/ui/src/uikitMain/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 | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
| |||
430 | 438 | | |
431 | 439 | | |
432 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
433 | 444 | | |
434 | 445 | | |
435 | 446 | | |
| |||
469 | 480 | | |
470 | 481 | | |
471 | 482 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | 483 | | |
476 | 484 | | |
477 | 485 | | |
| |||
0 commit comments