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) { ...@@ -4,6 +4,7 @@ enum class OS(val id: String) {
Linux("linux"), Linux("linux"),
Windows("windows"), Windows("windows"),
MacOS("macos"), MacOS("macos"),
Ios("ios"),
JS("js") JS("js")
; ;
......
...@@ -71,7 +71,6 @@ actual open class SkiaLayer actual constructor( ...@@ -71,7 +71,6 @@ actual open class SkiaLayer actual constructor(
contextHandler.apply { contextHandler.apply {
if (!initContext()) { if (!initContext()) {
error("initContext() failure") error("initContext() failure")
return
} }
initCanvas() initCanvas()
clearCanvas() clearCanvas()
......
...@@ -85,7 +85,7 @@ internal val platformOperations: PlatformOperations by lazy { ...@@ -85,7 +85,7 @@ internal val platformOperations: PlatformOperations by lazy {
} }
} }
} }
OS.JS -> { OS.JS, OS.Ios -> {
TODO("Commonize me") TODO("Commonize me")
} }
} }
......
...@@ -39,7 +39,7 @@ internal actual fun makeDefaultRenderFactory(): RenderFactory { ...@@ -39,7 +39,7 @@ internal actual fun makeDefaultRenderFactory(): RenderFactory {
GraphicsApi.DIRECT_SOFTWARE -> LinuxSoftwareRedrawer(layer, properties) GraphicsApi.DIRECT_SOFTWARE -> LinuxSoftwareRedrawer(layer, properties)
else -> LinuxOpenGLRedrawer(layer, properties) else -> LinuxOpenGLRedrawer(layer, properties)
} }
OS.JS -> { OS.JS, OS.Ios -> {
TODO("Commonize me") TODO("Commonize me")
} }
} }
......
...@@ -56,7 +56,7 @@ internal object SkikoProperties { ...@@ -56,7 +56,7 @@ internal object SkikoProperties {
OS.MacOS -> return GraphicsApi.METAL OS.MacOS -> return GraphicsApi.METAL
OS.Linux -> return GraphicsApi.OPENGL OS.Linux -> return GraphicsApi.OPENGL
OS.Windows -> return GraphicsApi.DIRECT3D OS.Windows -> return GraphicsApi.DIRECT3D
OS.JS -> TODO("commonize me") OS.JS, OS.Ios -> TODO("commonize me")
} }
} }
...@@ -68,7 +68,7 @@ internal object SkikoProperties { ...@@ -68,7 +68,7 @@ internal object SkikoProperties {
OS.Linux -> renderApiList = mutableListOf(GraphicsApi.OPENGL, GraphicsApi.DIRECT_SOFTWARE, GraphicsApi.SOFTWARE) OS.Linux -> renderApiList = mutableListOf(GraphicsApi.OPENGL, GraphicsApi.DIRECT_SOFTWARE, GraphicsApi.SOFTWARE)
OS.MacOS -> renderApiList = mutableListOf(GraphicsApi.METAL, GraphicsApi.SOFTWARE) OS.MacOS -> renderApiList = mutableListOf(GraphicsApi.METAL, GraphicsApi.SOFTWARE)
OS.Windows -> renderApiList = mutableListOf(GraphicsApi.DIRECT3D, GraphicsApi.OPENGL, GraphicsApi.DIRECT_SOFTWARE, 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) renderApiList.remove(head)
......
...@@ -5,6 +5,7 @@ actual val hostOs: OS by lazy { ...@@ -5,6 +5,7 @@ actual val hostOs: OS by lazy {
OsFamily.MACOSX -> OS.MacOS OsFamily.MACOSX -> OS.MacOS
OsFamily.LINUX -> OS.Linux OsFamily.LINUX -> OS.Linux
OsFamily.WINDOWS -> OS.Windows OsFamily.WINDOWS -> OS.Windows
OsFamily.IOS -> OS.Ios
else -> throw Error("Unsupported OS ${Platform.osFamily}") 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