Skip to content

Comments

Fix first frame rendering (#2683)#2692

Merged
siarb merged 2 commits intorelease/1.10from
andrei.salavei/cherry-pick-2683
Jan 19, 2026
Merged

Fix first frame rendering (#2683)#2692
siarb merged 2 commits intorelease/1.10from
andrei.salavei/cherry-pick-2683

Conversation

@ASalavei
Copy link

@ASalavei ASalavei commented Jan 16, 2026

As we were relying on didMoveToWindow() and layoutSubviews() to configure components, MetalLayer may receive a call to layoutSubviews() and, consequently, fire a draw call before the ComposeSceneMediator is properly initialised. Moving the synchronous frame draw to the drawRect fixes the issue. Note: drawRect does not work when used in MetalView (a view that uses CAMetalLayer).

Fixes
https://youtrack.jetbrains.com/issue/CMP-9471/iOS-Flash-on-toggling-between-views

Release Notes

Fixes - iOS

  • Fix an issue where the first frame may not be rendered on Compose container appearance

As we were relying on `didMoveToWindow()` and `layoutSubviews()` to
configure components, MetalLayer may receive a call to
`layoutSubviews()` and, consequently, fire a draw call before the
ComposeSceneMediator is properly initialised. Moving the synchronous
frame draw to the `drawRect` fixes the issue. Note: `drawRect` does not
work when used in `MetalView` (a view that uses `CAMetalLayer`).

Fixes
https://youtrack.jetbrains.com/issue/CMP-9471/iOS-Flash-on-toggling-between-views

## Release Notes
### Fixes - iOS
- Fix issue where the first frame may not be rendered on Compose
container appearance
@ASalavei ASalavei requested a review from siarb January 16, 2026 16:09
@siarb siarb merged commit b422ee5 into release/1.10 Jan 19, 2026
16 checks passed
@siarb siarb deleted the andrei.salavei/cherry-pick-2683 branch January 19, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants