Expand description
Real (non-stub) headless GPU rendering for OxiUI, built on wgpu.
This module implements oxiui_core::paint::RenderBackend on a GPU target
that is created headlessly — there is no window or swap-chain surface.
Draw commands are rasterised into an offscreen colour texture which can be
read back to CPU memory for testing or off-screen export.
Sub-modules:
device— headlessInstance/adapter/device/queue + offscreen texture.pipeline—solid.wgsl,gradient.wgsl,textured.wgsl,blur.wgsl, andcomposite.wgslcompiled pipelines.buffer—#[repr(C)]Podvertex / uniform layouts + quad emitters.tessellator— CPU path flattening and stroke/fill tessellation.texture— image upload utilities andTexturedDraw.shadow— ping-pong Gaussian blur + composite forBoxShadow.geometry— CPU geometry builder, visibility culling helpers, and draw-segment / gradient-draw data structures.exec— GPU pass execution helpers andFrameStats.renderer—WgpuBackendand theRenderBackendimplementation.instance— instanced rectangle rendering pipeline and renderer.render_target— off-screen render targets for cached subtrees.layer_cache— GPU-backed render-layer cache with dirty tracking.ring_buffer— streaming vertex/index ring buffer.
Re-exports§
pub use blend::blend_state_for_mode;pub use blend::BlendPipelineSet;pub use buffer::Globals;pub use buffer::GradientVertex;pub use buffer::TexVertex;pub use buffer::Vertex;pub use compute_blur::ComputeBlurPipeline;pub use device::GpuContext;pub use device::TARGET_FORMAT;pub use exec::FrameStats;pub use frame_pacing::FrameHistogram;pub use frame_pacing::FrameTimer;pub use frame_pacing::FrameTimerMode;pub use frame_pacing::PresentModeRecommendation;pub use hdr::select_surface_format;pub use hdr::HdrGpuContext;pub use hdr::SurfaceColorFormat;pub use hdr::HDR_FORMAT;pub use instance::InstanceRect;pub use instance::InstancedRectPipeline;pub use instance::InstancedRectRenderer;pub use layer_cache::LayerCache;pub use pipeline::BlurPipeline;pub use pipeline::CompositePipeline;pub use pipeline::GradientPipeline;pub use pipeline::SolidPipeline;pub use pipeline::TexturedPipeline;pub use render_target::RenderTarget;pub use renderer::WgpuBackend;pub use ring_buffer::RingAllocation;pub use ring_buffer::RingBuffer;pub use ring_buffer::RingBufferStats;pub use stencil::StencilClipState;pub use stencil::StencilTarget;pub use stencil::StencilWritePipeline;pub use stencil::DEPTH_STENCIL_FORMAT;
Modules§
- blend
- Blend mode pipeline variants and runtime blend-state selection.
- buffer
- Vertex / uniform data layouts for the headless solid-fill + gradient pipelines.
- compute_
blur - Compute-shader Gaussian blur pipeline.
- device
- Headless wgpu device acquisition and the offscreen colour target.
- earcut
- Ear-clipping triangulator for the fill tessellation pipeline.
- exec
- GPU pass execution helpers and per-frame statistics for
WgpuBackend. - frame_
pacing - GPU frame timing and adaptive present-mode selection.
- geometry
- CPU-side geometry building for
WgpuBackend. - hdr
- HDR and wide-gamut surface format selection for the wgpu backend.
- instance
- Instanced rendering for repeated UI primitives.
- layer_
cache - Render-layer cache for GPU-backed subtree caching.
- pipeline
- Render-pipeline construction for the solid-fill / SDF shader and the gradient pipeline.
- render_
target - Off-screen render targets for cached widget subtrees and compositing.
- renderer
WgpuBackend: headless GPURenderBackendimplementing Tier 1 primitives and gradient fills.- ring_
buffer - GPU upload ring buffer for streaming vertex/index data.
- shadow
- Shadow rendering: mask → 2-pass Gaussian blur → composite onto main target.
- stencil
- Stencil-buffer clipping for non-rectangular clip paths.
- tessellator
- CPU-side path tessellator for
DrawCommand::FillPathandDrawCommand::StrokePath. - texture
- Texture upload utilities for the textured pipeline.