#[repr(C)]pub struct VeloxSharedFrameDesc {Show 18 fields
pub generation_id: u32,
pub slot_index: u8,
pub is_fresh: u8,
pub handle_kind: u8,
pub sync_kind: u8,
pub width: u32,
pub height: u32,
pub pixel_format: u32,
pub raw_handle: u64,
pub sync_handle: u64,
pub fence_value: u64,
pub stride: u32,
pub offset: u32,
pub drm_format: u32,
pub drm_modifier: u64,
pub software_rgba_ptr: *const u8,
pub dirty_rects_ptr: *const CDirtyRect,
pub dirty_rect_count: u32,
}Expand description
跨语言零拷贝共享帧描述符(由宿主通过 velox_embed_acquire_shared_frame 获取)。
Fields§
§generation_id: u32表面重建代数(窗口 Resize 后递增,宿主检测到变化须重新打开共享句柄)。
slot_index: u8三缓冲槽位索引(0..3)。
is_fresh: u81 表示本帧为新渲染完成的画面,0 表示复用上次最新帧。
handle_kind: u8显存句柄类型(见 VeloxHandleKind)。
sync_kind: u8同步原语类型(见 VeloxSyncKind)。
width: u32物理像素宽度。
height: u32物理像素高度。
pixel_format: u32像素格式编码(0 = Rgba8Unorm,1 = Bgra8Unorm,均为预乘 Alpha)。
raw_handle: u64跨 API 原始显存句柄(Win32 NT HANDLE / Linux dma_buf fd / IOSurfaceRef / AHB*)。
sync_handle: u64跨 API GPU 同步句柄(ID3D12Fence NT HANDLE / Timeline Semaphore fd / MTLSharedEvent)。
fence_value: u64宿主采样前需等待的 GPU 栅栏单调计数值。
stride: u32行步长(字节,主要用于 LinuxDmaBufFd 与 SoftwareRgbaPtr)。
offset: u32平面字节偏移量。
drm_format: u32DRM FourCC(仅 Linux DMA-BUF 有效)。
drm_modifier: u64DRM Format Modifier(仅 Linux DMA-BUF 有效)。
software_rgba_ptr: *const u8软件光栅回退模式的 RGBA8888 像素缓冲指针(GPU 模式下为空指针)。
dirty_rects_ptr: *const CDirtyRect脏矩形数组指针(三缓冲 GPU 模式下已自动做 3 帧并集合并)。
dirty_rect_count: u32脏矩形数量。
Trait Implementations§
Auto Trait Implementations§
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<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) 时执行闭包修饰自身,否则原样返回。