Compose-integrated rendering surface for video and OpenGL #338
Replies: 2 comments 2 replies
|
Thanks for the well-framed proposal — you're describing what Flutter calls an external texture (the Why it's feasible here. Nucleus's Tao window backend owns the entire render pipeline — we create the Skia The import paths are the well-trodden ones Chromium and Flutter desktop use:
Because the pixels land inside the Skia scene graph, you get everything Scope we'd commit to. An One boundary worth being explicit about: this is for passive GPU pixels (video, OpenGL, 3D engines, map renderers). All input goes to Compose — the producer receives nothing unless you forward events yourself. So interactive native widgets (WebViews especially) remain Known caveats: Tao backend only (no AWT path), and YUV/NV12 video frames need a colorspace conversion step (producer-side or via Skia YUV sampling) — both solvable, just calling them out. Could you share more about your concrete use case — video playback (which ComposeMediaPlayer would cover once migrated), a GL engine viewport, something else? That would help us prioritize which platform/producer path to prototype first (macOS is where we have the most infrastructure in place today). |
|
It's now available in Nucleus 2.3.0 |
Uh oh!
There was an error while loading. Please reload this page.
Could Nucleus support a GPU-backed rendering surface for high-performance video or OpenGL content?
"NativeView" provides native-view embedding and a dedicated Compose overlay slot, but the rendered content remains outside the normal Compose composition. What is still missing is an efficient rendering path that allows regular Compose content from the surrounding layout-controls, HUDs, popups, dialogs, and other composables - to overlap the rendered area normally, without moving everything into a special overlay slot or inheriting native-view/"SwingPanel"-style interop restrictions.
Conceptually, this would be similar to a "SurfaceView", but integrated with Compose composition and z-order, while avoiding the overhead of copying every frame through a Compose bitmap.
Is something like this technically feasible within Nucleus, and could it be considered for the roadmap?
All reactions