skiko/src/awtMain/kotlin/org/jetbrains/skiko/context/DirectSoftwareContextHandler.kt [12:28]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private var currentWidth = 0 private var currentHeight = 0 private fun isSizeChanged(width: Int, height: Int): Boolean { if (width != currentWidth || height != currentHeight) { currentWidth = width currentHeight = height return true } return false } override fun initCanvas() { val scale = layer.contentScale val w = (layer.width * scale).toInt().coerceAtLeast(0) val h = (layer.height * scale).toInt().coerceAtLeast(0) if (isSizeChanged(w, h) || surface == null) { disposeCanvas() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - skiko/src/awtMain/kotlin/org/jetbrains/skiko/context/OpenGLContextHandler.kt [10:27]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private var currentWidth = 0 private var currentHeight = 0 private fun isSizeChanged(width: Int, height: Int): Boolean { if (width != currentWidth || height != currentHeight) { currentWidth = width currentHeight = height return true } return false } override fun initCanvas() { val scale = layer.contentScale val w = (layer.width * scale).toInt().coerceAtLeast(0) val h = (layer.height * scale).toInt().coerceAtLeast(0) if (isSizeChanged(w, h) || surface == null) { disposeCanvas() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -