File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
skiko/src/commonTest/kotlin/org/jetbrains/skia Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ package org.jetbrains.skia
22
33import org.jetbrains.skia.impl.interopScope
44import org.jetbrains.skia.impl.use
5+ import org.jetbrains.skiko.Arch
56import org.jetbrains.skiko.KotlinBackend
67import org.jetbrains.skiko.OS
8+ import org.jetbrains.skiko.hostArch
79import org.jetbrains.skiko.hostOs
810import org.jetbrains.skiko.kotlinBackend
911import org.jetbrains.skiko.tests.TestGlContext
@@ -115,7 +117,12 @@ class SurfaceTest {
115117 }
116118
117119 val pixels = TestGlContext .run {
118- DirectContext .makeGL().useContext { ctx ->
120+ val ctx = when (hostArch) {
121+ Arch .X64 -> DirectContext .makeGL()
122+ Arch .Arm64 -> DirectContext .makeEGL()
123+ else -> error(" Unsupported arch: $hostArch " )
124+ }
125+ ctx.useContext {
119126 val imageInfo = ImageInfo .makeN32Premul(16 , 16 )
120127 val surface = Surface .makeRenderTarget(ctx, budgeted = false , imageInfo)
121128
You can’t perform that action at this time.
0 commit comments