Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw immediately on panel size change #923

Merged
merged 4 commits into from
May 28, 2024

Conversation

MatkovIvan
Copy link
Member

Fixes a couple of issues like: JetBrains/compose-multiplatform#4744 (TODO: collect all references)

Before (slow-mo)

doc_2024-05-14_18-01-27.mp4

After (slow-mo)

video_2024-05-14_18-01-41.mp4

@MatkovIvan MatkovIvan requested a review from igordmn May 14, 2024 16:03
tryRedrawImmediately()
}

override fun setBounds(x: Int, y: Int, width: Int, height: Int) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.jetbrains.skiko.SkiaLayerTest[awt] > resize window[awt] FAILED

fails on Windows

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I saw this. Regardless of CI state, please check the fix locally to make sure that we agree that the change makes sense

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is okay, though I see "jumps" on resize. But it is better than the current behaviour.

chrome_LBIg91l8X8.mp4

Regarding the failed test - it fails locally as well, and it is the only failed test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem was with software renderer - it just stops to display updates after try to redraw during layout despite any render/flush/... calls after that. Spend some time on it, but the reason isn't clear.

Added a check to apply my fix only to Direct3D to not just fix this issue but also reduce the scope of this change

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this fix help Metal/OpenGL as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Help with what? The issue was only in Windows/DirectX

@MatkovIvan MatkovIvan merged commit c66eebc into master May 28, 2024
1 check passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/redraw-on-resize branch May 28, 2024 17:39
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.

None yet

2 participants