pub enum ExportedHandle {
Win32Dx12NtHandle {
nt_handle: u64,
dxgi_format: u32,
adapter_luid: [u8; 8],
},
LinuxDmaBuf {
fd: i32,
stride: u32,
offset: u32,
drm_format: u32,
modifier: u64,
},
AppleIoSurface {
iosurface_ref: u64,
iosurface_id: u32,
},
AndroidHardwareBuffer {
ahb_ptr: u64,
},
InternalOnly,
}Expand description
跨平台导出的共享显存句柄描述符(供外部 Qt6 / GTK4 / WinUI 3 / WPF / 原生合成器零拷贝采样)。
Variants§
Win32Dx12NtHandle
Windows DX12 跨进程/跨 API NT HANDLE(由 ID3D12Device::CreateSharedHandle 创建,宿主通过 OpenSharedHandle / ID3D11Device1::OpenSharedResource1 打开)。
Fields
LinuxDmaBuf
Linux Vulkan / Wayland dma_buf 文件描述符(对接 zwp_linux_dmabuf_v1 / GdkDmabufTextureBuilder / Qt RHI)。
Fields
AppleIoSurface
Apple Metal IOSurfaceRef 指针与全局 IOSurfaceID(macOS / iOS 零拷贝共享显存)。
AndroidHardwareBuffer
Android NDK AHardwareBuffer* 原生句柄(对接 ASurfaceTransaction_setBuffer / Vulkan 外部内存)。
InternalOnly
内部标准 wgpu::Texture(未启用 gpu-interop 或驱动不支持外部显存导出时的安全回退模式)。
Implementations§
Trait Implementations§
Source§impl Clone for ExportedHandle
impl Clone for ExportedHandle
impl Copy for ExportedHandle
Source§impl Debug for ExportedHandle
impl Debug for ExportedHandle
impl Eq for ExportedHandle
Source§impl PartialEq for ExportedHandle
impl PartialEq for ExportedHandle
impl StructuralPartialEq for ExportedHandle
Auto Trait Implementations§
impl Forget for ExportedHandle
impl Freeze for ExportedHandle
impl Move for ExportedHandle
impl RefUnwindSafe for ExportedHandle
impl Send for ExportedHandle
impl Sync for ExportedHandle
impl Unpin for ExportedHandle
impl UnsafeUnpin for ExportedHandle
impl UnwindSafe for ExportedHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。