https://kotlinlang.org logo
#compose
Title
# compose
m

Michael Paus

01/16/2022, 2:54 PM
Latest Skia on Android? According to recent activities in the Skiko project (https://github.com/JetBrains/skiko/pull/451) I am wondering whether Jetbrains is planning to bundle the Skia library with all platforms which are supported by Compose. Am I just dreaming or would that mean that we could finally have the same native canvas based on Skia on all platforms including Android? One Graphics API, with all the latest features, to rule them all even on older devices? This would really solve a problem which I had recently. Keeping my fingers and toes crossed that this is not just a misinterpretation or a day dream 😆
a

Albert Chang

01/16/2022, 5:05 PM
I bet you are dreaming 🙂
d

dimsuz

01/16/2022, 7:46 PM
but isn't android's draw calls also based on skia? bundled with os though.
m

Michael Paus

01/16/2022, 9:43 PM
@dimsuz Yes, but not directly and not the latest version which can have significant shortcomings as in my case.
z

Zach Klippenstein (he/him) [MOD]

01/16/2022, 10:10 PM
I doubt we would bundle Skia with compose on android, and I haven't heard anyone talking about doing so internally. I'm not sure what the implications would be but I'm guessing at least it would be a little too heavy of a dependency for every app to include.
c

Colton Idle

01/16/2022, 11:30 PM
Could an app potentially bundle skia if they needed/wanted to use the latest? Curious of what the shortcomings were Michael. I see you doing some interesting stuff in compose-desktop 😄
z

Zach Klippenstein (he/him) [MOD]

01/17/2022, 2:09 AM
It wouldn’t be easy, and i doubt it would be possible. Compose integrates with the Android framework, which wraps skia but doesn’t expose it directly. You’d have to do your own build of Compose.
👍 1
c

Colton Idle

01/17/2022, 4:48 AM
I guess I could potentially just build a framework that just ships a vm with every app and it would do custom drawing using its own API. I'd probably choose a unique language to build the entire framework and I would make it work entirely cross platform.
z

Zach Klippenstein (he/him) [MOD]

01/17/2022, 7:01 AM
So flutter 😜
🧌 1
blob wink 1
m

Michael Paus

01/17/2022, 9:35 AM
@Colton Idle The concrete problem I had recently was the following: When zooming in an important piece of the graphics just vanished with the following log message (which a user would not have seen):
W/OpenGLRenderer: Shape too large to be rendered into a texture (22835x28834, max=16384x16384)
This was on Android 8. On higher versions (10/11) it worked without problem. This is a known limitation of old Android graphics which would just go away by bundling the skia library.
👍 1
59 Views