Unverified Commit 1f022991 authored by Nikolay Igotti's avatar Nikolay Igotti Committed by GitHub

Add IOS to OS list (#272)

parent a9c683b3
......@@ -4,6 +4,7 @@ enum class OS(val id: String) {
Linux("linux"),
Windows("windows"),
MacOS("macos"),
Ios("ios"),
JS("js")
;
......
......@@ -71,7 +71,6 @@ actual open class SkiaLayer actual constructor(
contextHandler.apply {
if (!initContext()) {
error("initContext() failure")
return
}
initCanvas()
clearCanvas()
......
......@@ -85,7 +85,7 @@ internal val platformOperations: PlatformOperations by lazy {
}
}
}
OS.JS -> {
OS.JS, OS.Ios -> {
TODO("Commonize me")
}
}
......
......@@ -39,7 +39,7 @@ internal actual fun makeDefaultRenderFactory(): RenderFactory {
GraphicsApi.DIRECT_SOFTWARE -> LinuxSoftwareRedrawer(layer, properties)
else -> LinuxOpenGLRedrawer(layer, properties)
}
OS.JS -> {
OS.JS, OS.Ios -> {
TODO("Commonize me")
}
}
......
......@@ -56,7 +56,7 @@ internal object SkikoProperties {
OS.MacOS -> return GraphicsApi.METAL
OS.Linux -> return GraphicsApi.OPENGL
OS.Windows -> return GraphicsApi.DIRECT3D
OS.JS -> TODO("commonize me")
OS.JS, OS.Ios -> TODO("commonize me")
}
}
......@@ -68,7 +68,7 @@ internal object SkikoProperties {
OS.Linux -> renderApiList = mutableListOf(GraphicsApi.OPENGL, GraphicsApi.DIRECT_SOFTWARE, GraphicsApi.SOFTWARE)
OS.MacOS -> renderApiList = mutableListOf(GraphicsApi.METAL, GraphicsApi.SOFTWARE)
OS.Windows -> renderApiList = mutableListOf(GraphicsApi.DIRECT3D, GraphicsApi.OPENGL, GraphicsApi.DIRECT_SOFTWARE, GraphicsApi.SOFTWARE)
OS.JS -> TODO("commonize me")
OS.JS, OS.Ios -> TODO("commonize me")
}
renderApiList.remove(head)
......
......@@ -5,6 +5,7 @@ actual val hostOs: OS by lazy {
OsFamily.MACOSX -> OS.MacOS
OsFamily.LINUX -> OS.Linux
OsFamily.WINDOWS -> OS.Windows
OsFamily.IOS -> OS.Ios
else -> throw Error("Unsupported OS ${Platform.osFamily}")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment