pub struct CurveComputeDispatcher {
pub input_curves: Vec<RawCurveInput>,
pub tolerance: f32,
}Expand description
High-performance CPU dispatcher and simulator matching the WGSL compute pipeline layout.
Fields§
§input_curves: Vec<RawCurveInput>§tolerance: f32Implementations§
Source§impl CurveComputeDispatcher
impl CurveComputeDispatcher
pub fn new(tolerance: f32) -> Self
pub fn push_cubic( &mut self, cubic: &CubicBezier, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, )
pub fn push_quadratic( &mut self, quad: &QuadraticBezier, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, )
pub fn push_line( &mut self, p0: Point2D, p1: Point2D, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, )
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn input_bytes(&self) -> &[u8] ⓘ
Sourcepub fn dispatch_compute(&self) -> Vec<GpuPathSegment>
pub fn dispatch_compute(&self) -> Vec<GpuPathSegment>
Simulates the WGSL compute pass on CPU, adaptively decomposing cubics into quadratics.
Trait Implementations§
Source§impl Clone for CurveComputeDispatcher
impl Clone for CurveComputeDispatcher
Source§impl Debug for CurveComputeDispatcher
impl Debug for CurveComputeDispatcher
Auto Trait Implementations§
impl Forget for CurveComputeDispatcher
impl Freeze for CurveComputeDispatcher
impl Move for CurveComputeDispatcher
impl RefUnwindSafe for CurveComputeDispatcher
impl Send for CurveComputeDispatcher
impl Sync for CurveComputeDispatcher
impl Unpin for CurveComputeDispatcher
impl UnsafeUnpin for CurveComputeDispatcher
impl UnwindSafe for CurveComputeDispatcher
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