From 8c6b24de529893c4518b5c8757072df0890c5b28 Mon Sep 17 00:00:00 2001 From: Nikita Lipsky Date: Wed, 6 Nov 2024 19:39:11 +0200 Subject: [PATCH] Update benchmarks to use 1.7.0 Compose version (#5160) --- benchmarks/ios/jvm-vs-kotlin-native/gradle.properties | 4 ++-- .../src/commonMain/kotlin/MeasureComposable.kt | 4 ++-- benchmarks/kn-performance/gradle.properties | 4 ++-- .../kn-performance/src/commonMain/kotlin/MeasureComposable.kt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/benchmarks/ios/jvm-vs-kotlin-native/gradle.properties b/benchmarks/ios/jvm-vs-kotlin-native/gradle.properties index bca924c522..5bfce30965 100644 --- a/benchmarks/ios/jvm-vs-kotlin-native/gradle.properties +++ b/benchmarks/ios/jvm-vs-kotlin-native/gradle.properties @@ -1,5 +1,5 @@ -compose.version=1.6.11 -kotlin.version=2.0.0 +compose.version=1.7.0 +kotlin.version=2.0.20 agp.version=7.0.4 org.gradle.jvmargs=-Xmx3g compose.desktop.verbose=true diff --git a/benchmarks/ios/jvm-vs-kotlin-native/src/commonMain/kotlin/MeasureComposable.kt b/benchmarks/ios/jvm-vs-kotlin-native/src/commonMain/kotlin/MeasureComposable.kt index 98236a9de5..501e4e617b 100644 --- a/benchmarks/ios/jvm-vs-kotlin-native/src/commonMain/kotlin/MeasureComposable.kt +++ b/benchmarks/ios/jvm-vs-kotlin-native/src/commonMain/kotlin/MeasureComposable.kt @@ -1,7 +1,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.InternalComposeUiApi import androidx.compose.ui.graphics.asComposeCanvas -import androidx.compose.ui.scene.MultiLayerComposeScene +import androidx.compose.ui.scene.CanvasLayersComposeScene import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.IntSize import kotlin.time.Duration @@ -18,7 +18,7 @@ fun measureComposable( frameCount: Int = 1000, content: @Composable () -> Unit ): Duration { - val scene = MultiLayerComposeScene(size = IntSize(width, height)) + val scene = CanvasLayersComposeScene(size = IntSize(width, height)) try { scene.setContent(content) val surface = org.jetbrains.skia.Surface.makeNull(width, height) diff --git a/benchmarks/kn-performance/gradle.properties b/benchmarks/kn-performance/gradle.properties index 334ef1c1f1..d7349fb373 100644 --- a/benchmarks/kn-performance/gradle.properties +++ b/benchmarks/kn-performance/gradle.properties @@ -1,5 +1,5 @@ -compose.version=1.6.11 -kotlin.version=2.0.0 +compose.version=1.7.0 +kotlin.version=2.0.20 org.gradle.jvmargs=-Xmx3g kotlin.native.useEmbeddableCompilerJar=true compose.desktop.verbose=true diff --git a/benchmarks/kn-performance/src/commonMain/kotlin/MeasureComposable.kt b/benchmarks/kn-performance/src/commonMain/kotlin/MeasureComposable.kt index 91d84814da..10c1bccdc4 100644 --- a/benchmarks/kn-performance/src/commonMain/kotlin/MeasureComposable.kt +++ b/benchmarks/kn-performance/src/commonMain/kotlin/MeasureComposable.kt @@ -1,7 +1,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.InternalComposeUiApi import androidx.compose.ui.graphics.asComposeCanvas -import androidx.compose.ui.scene.MultiLayerComposeScene +import androidx.compose.ui.scene.CanvasLayersComposeScene import androidx.compose.ui.unit.IntSize import org.jetbrains.skia.Surface import kotlin.time.Duration @@ -44,7 +44,7 @@ fun measureComposable( graphicsContext: GraphicsContext?, content: @Composable () -> Unit ): BenchmarkResult = runBlocking { - val scene = MultiLayerComposeScene(size = IntSize(width, height)) + val scene = CanvasLayersComposeScene(size = IntSize(width, height)) try { val nanosPerFrame = (1.0 / targetFps.toDouble() * nanosPerSecond).toLong() scene.setContent(content)