pub(crate) fn create_dmabuf_from_bo(bo: &BufferObject<()>) -> DmabufExpand description
Export the offscreen GBM render target as a Dmabuf so the very same GPU pixels can be both rendered into and encoded with no intervening copy — the linchpin of the zero-copy capture path. The returned dmabuf is the one handle the GLES renderer binds as its framebuffer AND a hardware encoder (NVENC through CUDA, or VAAPI) imports to read those pixels directly, which only works if the buffer is described precisely enough (fd, stride, DRM modifier) for the importer to interpret it. The render targets and host capture slots have one plane; retain the BO’s format so an opaque host slot is not imported as a buffer with alpha.