My goal is to be able to leverage the GPU in a background thread to create an offscreen image that is rendered using the Skia Canvas class. Ideally I would have liked to use Compose multiplatform and its Skiko library to do this, but due to the limitations of its DirectContext class, its not possible to write an EGL surface into its Canvas.
As a consequence, I've had to use native functionality to implement this. I have it working for the desktop using the LWJGL library. For Android I follow these steps, running from an event queue that is running in a background thread:
not kotlin but kotlin colored 2
🧵 2