pub struct GpuPathBatch {
pub segments: Vec<GpuPathSegment>,
pub clip_masks: Vec<GpuClipMask>,
pub clip_spans: Vec<GpuClipSpan>,
}Expand description
Batch collection of GPU instanced path segments ready for upload to storage/vertex buffers.
Fields§
§segments: Vec<GpuPathSegment>§clip_masks: Vec<GpuClipMask>Compiled non-rectangular/stencil clip masks referenced by Self::clip_spans.
clip_spans: Vec<GpuClipSpan>Contiguous segment ranges mapped to their active optional stencil clip mask index.
Implementations§
Source§impl GpuPathBatch
impl GpuPathBatch
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn push(&mut self, segment: GpuPathSegment)
Sourcepub fn push_with_clip(
&mut self,
segment: GpuPathSegment,
clip_mask: Option<usize>,
)
pub fn push_with_clip( &mut self, segment: GpuPathSegment, clip_mask: Option<usize>, )
Pushes a path segment associated with an optional non-rectangular stencil clip mask index.
pub fn has_stencil_clips(&self) -> bool
Sourcepub fn clip_mask_for_segment(
&self,
segment_index: usize,
) -> Option<&GpuClipMask>
pub fn clip_mask_for_segment( &self, segment_index: usize, ) -> Option<&GpuClipMask>
Returns the stencil clip mask governing segment_index, if any.
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_bytes(&self) -> &[u8] ⓘ
Sourcepub fn from_display_list(
list: &DisplayList,
viewport_width: f32,
viewport_height: f32,
) -> Self
pub fn from_display_list( list: &DisplayList, viewport_width: f32, viewport_height: f32, ) -> Self
Compiles vector paths from a DisplayList into GPU path segments.
Sourcepub fn from_display_list_damaged(
list: &DisplayList,
damage: Option<Rect>,
viewport_width: f32,
viewport_height: f32,
) -> Self
pub fn from_display_list_damaged( list: &DisplayList, damage: Option<Rect>, viewport_width: f32, viewport_height: f32, ) -> Self
Compiles vector paths from a DisplayList into GPU path segments with optional damage scissoring.
Trait Implementations§
Source§impl Clone for GpuPathBatch
impl Clone for GpuPathBatch
Source§impl Debug for GpuPathBatch
impl Debug for GpuPathBatch
Source§impl Default for GpuPathBatch
impl Default for GpuPathBatch
Source§impl PartialEq for GpuPathBatch
impl PartialEq for GpuPathBatch
impl StructuralPartialEq for GpuPathBatch
Auto Trait Implementations§
impl Forget for GpuPathBatch
impl Freeze for GpuPathBatch
impl Move for GpuPathBatch
impl RefUnwindSafe for GpuPathBatch
impl Send for GpuPathBatch
impl Sync for GpuPathBatch
impl Unpin for GpuPathBatch
impl UnsafeUnpin for GpuPathBatch
impl UnwindSafe for GpuPathBatch
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