Expose a stable extension seam for externally owned native GPU surfaces

Author: HaoxincodeCreated Sep 22, 2026Updated Sep 28, 2026
Labelsgpui

Problem

Applications embedding camera/video frames already decoded by platform APIs need to render externally owned native GPU resources (for example a D3D11 BGRA SRV or a CoreVideo/Metal surface) without copying pixels through the CPU atlas.

The current published gpui-pre snapshots and renderer APIs do not provide a stable seam for this: downstream applications must maintain a fork of the GPUI snapshot, add a scene primitive, and coordinate resource lifetime until the command buffer completes.

This becomes especially painful when upgrading GPUI Kit: the Kit release pins an exact GPUI snapshot, so a downstream fork based on an older snapshot cannot be combined with the newer gpui-component APIs.

Requested direction

Could GPUI Kit document and/or expose a supported native-surface extension point with:

  • a platform-neutral scene primitive carrying externally owned resources;
  • platform-specific import/draw hooks for D3D11 and Metal/CoreVideo;
  • an explicit completion/lifetime contract;
  • exact snapshot compatibility guidance for downstream adapters.

I can provide a minimal implementation and tests based on a real camera receiver integration if this direction is acceptable.

Source: longbridge/gpui-component