Commit 72ad063f authored by Nikolay Igotti's avatar Nikolay Igotti

Make sure library loaded on class init

parent 3b514424
...@@ -15,12 +15,11 @@ internal class MetalRedrawer( ...@@ -15,12 +15,11 @@ internal class MetalRedrawer(
private val layer: SkiaLayer, private val layer: SkiaLayer,
properties: SkiaLayerProperties properties: SkiaLayerProperties
) : Redrawer { ) : Redrawer {
init { companion object {
// We use native code inside concurrent code, so make sure native library is loaded init {
// before init. Library.load()
Library.load() }
} }
private var isDisposed = false private var isDisposed = false
private var disposeLock = Any() private var disposeLock = Any()
private val device = layer.backedLayer.useDrawingSurfacePlatformInfo { private val device = layer.backedLayer.useDrawingSurfacePlatformInfo {
......
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