Sargun Vohra
04/28/2026, 8:40 PMAndroidView, UIKitView, SwingPanel, and WebElementView. That works, but it has compositor/input limitations: Compose modifiers don’t reliably apply to the native view (alpha, scale, rotation, clipping, etc.), desktop/web have layering constraints for Compose UI over the native content, and input behavior can get awkward. The quirks are tolerable on Android and iOS, but a dealbreaker on desktop and web.
The path I’d like is: render native content into a GPU texture, then sample that texture directly from a Compose/Skiko Canvas. That would make the native rendering a normal part of the Compose scene, so graphicsLayer transforms and clipping work with full fidelity.
The hard part is texture sharing. The options seem to be:
1. CPU readback every frame: render native content, read the texture back to CPU memory, create a Skiko Image, then draw it. This is expensive and adds latency/stutter.
2. GPU texture sharing: create/import the texture in the same GPU context Compose/Skiko is using, then sample it directly without leaving GPU memory. This is the path I want for smooth interactive rendering.
I prototyped option 2 on Compose Desktop + Metal (warning: ai slop). As far as I can tell, there isn’t currently a public API to access the live GPU context/device backing the Compose scene. But with a tiny bit of reflection into Skiko internals, it works! Native Metal renders into a MTLTexture, Skia samples that texture, and Compose applies graphicsLayer transforms normally. No SwingPanel interop involved.
Questions:
1. Has anyone else explored this path?
2. Is there an existing public way to integrate with Skiko’s live GPU context/device that I missed?
3. Any existing discussions / YouTrack tickets?
4. Would there be appetite for exposing this in Skiko behind an experimental API if I put together a PR?
This would be useful beyond maps too: video, video calls, games, custom native renderers, streaming surfaces, etc.romainguy
04/28/2026, 8:48 PMAndroidView on Android, you can do the same thing you did here for Metal (render into a Surface backed by a hardware bitmap and just draw that as a regular Bitmap)Sargun Vohra
04/28/2026, 8:49 PMromainguy
04/28/2026, 8:50 PMTexureView via AndroidView or the Compose wrapper)romainguy
04/28/2026, 8:53 PMSurface, external textures, etc. and make sure the APIs are not backend-specificSargun Vohra
04/28/2026, 8:58 PMKonstantin Tskhovrebov
04/28/2026, 9:23 PMSargun Vohra
04/28/2026, 9:25 PMKonstantin Tskhovrebov
04/29/2026, 8:31 AMIvan Matkov
04/29/2026, 8:36 AMSargun Vohra
06/24/2026, 11:37 PMIvan Matkov
06/25/2026, 8:02 AMSargun Vohra
06/25/2026, 4:22 PMIvan Matkov
06/25/2026, 4:30 PMSkiaLayer . I probably need to create some subtasks to reflect actual state 😬
Can I ask you to file skiko issue with your use case to properly track it as external request? I'll link it to related work after thatSargun Vohra
06/25/2026, 4:31 PMSargun Vohra
06/27/2026, 7:23 AMSargun Vohra
08/08/2026, 5:17 AM