pub trait AsyncPlatformSurface {
// Required methods
fn surface_size(&self) -> (i16, i16);
fn flush_frame_dt_async(
&mut self,
engine: &mut VeloxEngine,
dt_ms: u16,
) -> impl Future<Output = FlushReport>;
// Provided method
fn flush_frame_async(
&mut self,
engine: &mut VeloxEngine,
) -> impl Future<Output = FlushReport> { ... }
}Expand description
面向异步运行时的平台显示表面抽象(非阻塞异步帧刷新)。
Required Methods§
Sourcefn surface_size(&self) -> (i16, i16)
fn surface_size(&self) -> (i16, i16)
获取当前显示表面的逻辑宽高 (width, height)。
Sourcefn flush_frame_dt_async(
&mut self,
engine: &mut VeloxEngine,
dt_ms: u16,
) -> impl Future<Output = FlushReport>
fn flush_frame_dt_async( &mut self, engine: &mut VeloxEngine, dt_ms: u16, ) -> impl Future<Output = FlushReport>
按给定时间步长 dt_ms(毫秒)异步推进一帧 VeloxEngine 并刷新所有脏区。
Provided Methods§
Sourcefn flush_frame_async(
&mut self,
engine: &mut VeloxEngine,
) -> impl Future<Output = FlushReport>
fn flush_frame_async( &mut self, engine: &mut VeloxEngine, ) -> impl Future<Output = FlushReport>
以默认 60FPS(16ms)步长异步执行一帧刷新。
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".