forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move frame encoding to separate thread when possible (#829)
## Proposed Changes If no CATransaction sync is needed, perform Picture recorded commands execution on a separate thread. Fix a freeze on `waitUntilScheduled` if no transaction is available by moving synchronization from interop scope (any UIView is present in the composition) to per-frame scope (any UIView transaction is issued by composition in current frame). ## Testing Test: N/A ## Issues Fixed Removes work from main thread, when possible, allowing Compose to run there without waiting for CPU to finish encoding GPU commands. A freeze on `waitUntilScheduled` during interop synchronization if no transaction is available. <img width="324" alt="Screenshot 2023-09-19 at 12 13 00" src="https://github.com/JetBrains/compose-multiplatform-core/assets/4167681/e54d83e3-ca58-43aa-a4a7-4764dd8ce841"> <img width="371" alt="Screenshot 2023-09-19 at 12 13 05" src="https://github.com/JetBrains/compose-multiplatform-core/assets/4167681/8e4fcf0b-2b64-473e-a930-fae97a086a12"> ## Depends on #820
- Loading branch information
1 parent
4d5d5a1
commit cf8b443
Showing
2 changed files
with
77 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters