Daniel Pitts
04/05/2025, 5:58 PMSergey Y.
04/05/2025, 6:41 PMDaniel Pitts
04/05/2025, 6:42 PMDaniel Pitts
04/05/2025, 6:56 PMDaniel Pitts
04/05/2025, 6:56 PMDaniel Pitts
04/05/2025, 6:57 PMAlexander Maryanovsky
04/07/2025, 7:44 AMAlexander Maryanovsky
04/07/2025, 7:45 AMSergey Y.
04/07/2025, 7:49 AMAlexander Maryanovsky
04/07/2025, 7:50 AMSergey Y.
04/07/2025, 7:53 AMAlexander Maryanovsky
04/07/2025, 7:56 AMSergey Y.
04/07/2025, 8:00 AMAlexander Maryanovsky
04/07/2025, 8:04 AMDaniel Pitts
04/07/2025, 6:29 PMDaniel Pitts
04/07/2025, 6:31 PMTomislav Mladenov
04/08/2025, 4:38 PMDaniel Pitts
04/12/2025, 12:39 AMScaffold
Tomislav Mladenov
04/12/2025, 8:24 AMDaniel Pitts
04/12/2025, 3:00 PMimport androidx.compose.ui.awt.*
import java.awt.EventQueue.*
import javax.swing.*
fun main() {
invokeLater {
JFrame().apply {
title = "Normal JFrame"
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
setSize(800, 600)
contentPane = ComposePanel()
isVisible = true
}
}
}
For this one, if I comment out contentPane = ComposePanel()
, it resizes smoothly. Otherwise it stutters. It seems likely that something in the either the ComposeContainer or in the Skia code itself is blocking the EDT thread when it shouldn't.Daniel Pitts
04/12/2025, 3:47 PMSkiaLayer
takes 16ms while resizing, which indicates its waiting for a vsync. (16ms = ~60hz). The thing is that AWT already waits for vsync, so its basically wasting a frame.Alexander Maryanovsky
04/12/2025, 3:51 PMDaniel Pitts
04/12/2025, 3:52 PMDaniel Pitts
04/12/2025, 4:00 PMAlexander Maryanovsky
04/12/2025, 4:02 PMDaniel Pitts
04/12/2025, 4:05 PM// Wait for vsync because:
// - macOS drops the second/next drawables if they are sent in the same vsync
// - it makes frames consistent and limits FPS
Sounds like maybe this was a work-around for some other bug? Anyway, thanks for taking a look!Alexander Maryanovsky
04/12/2025, 4:06 PMDaniel Pitts
04/12/2025, 4:08 PM