Skip to main content

Module draw_sink

Module draw_sink 

Source
Expand description

The seam between draw-command production and draw-command execution.

The browser layer produces a Vec<DrawCommand> for a window and nothing more; executing those commands is a platform concern. Handing the concrete GPU renderer down through the call stack instead would make every layer above know that rendering happens on wgpu, on a surface bound to an OS window — which is exactly the assumption that breaks if the surface ever has to live in another process.

DrawSink is the contract. The shell owns the implementation; today that is GpuRenderer, but a recording sink, an offscreen one, or a remote one are equally valid.

Enums§

DrawError
Failures a DrawSink can report.

Traits§

DrawSink
A destination for one window’s draw commands.