pub trait Surface {
// Required methods
fn size(&self) -> (u32, u32);
fn resize(&mut self, width: u32, height: u32);
fn acquire(&mut self) -> Result<Frame, SurfaceError>;
fn present(&mut self, frame: Frame, hal: &Hal);
}Expand description
Superficie gráfica donde llimphi pinta.
Vello (rasterizador) emite a una textura intermedia con storage binding
(la única forma portable: los formatos de swapchain no aceptan writes
de compute shader en muchos adapters). En present se blittea la
intermedia al swapchain real y se hace el flip.
Implementaciones:
WinitSurface: ventana Wayland/X11 (dev + producción vía mirada).WawaFramebufferSurface(TODO): framebuffer directo del kernel wawa.
Required Methods§
fn size(&self) -> (u32, u32)
fn resize(&mut self, width: u32, height: u32)
Sourcefn acquire(&mut self) -> Result<Frame, SurfaceError>
fn acquire(&mut self) -> Result<Frame, SurfaceError>
Adquiere la textura intermedia donde el raster pinta este frame.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".