pub struct RecordSegment {
pub lane: RecordLane,
pub start: u32,
pub count: u32,
pub blend: BlendMode,
pub gradient: bool,
pub vertex_gradient: bool,
pub brushes: u8,
pub kinds: u8,
pub band_class: u8,
pub interiors: bool,
pub occluders: bool,
pub bare_interiors: bool,
}Expand description
A run of consecutive entries of one lane that a single draw can take: shapes sharing a blend mode and a brush class, or a run of other primitives.
Fields§
§lane: RecordLane§start: u32§count: u32§blend: BlendMode§gradient: bool§vertex_gradient: boolWhether the segment’s records are gradients their vertices shade
(see ShapeRecord::is_vertex_gradient), which are not gradient:
the draw that takes them dithers their fragments.
brushes: u8One bit per BRUSH_KIND_* present in the segment; bit 0 stands for
the records drawn without a brush.
kinds: u8One bit per FRAGMENT_KIND_* present in the segment.
band_class: u8The band class every record of the segment is drawn at: the index
into ARC_BUCKET_SEGMENTS of the strip each record is instanced
over, so one draw covers the segment in record order.
interiors: boolWhether a rounded fill in the segment has an interior, where coverage is 1 without its distance field, covering at least half of its rect: the only records that repay shading their interior apart.
occluders: boolWhether a solid fill in the segment has an interior of at least
OCCLUDER_MIN_AREA: one a pass lays down ahead of its paint, so
what it hides is never shaded.
bare_interiors: boolWhether a fill in the segment has an interior that repays shading
apart (see interiors) that no pass lays down ahead of its paint: a
gradient’s or a translucent colour’s.
Implementations§
Source§impl RecordSegment
impl RecordSegment
pub fn range(&self) -> Range<usize> ⓘ
Sourcepub fn uniform_kind(&self) -> Option<u32>
pub fn uniform_kind(&self) -> Option<u32>
The one kind every record of the segment has, if they agree.
Sourcepub fn uniform_brush(&self) -> Option<u32>
pub fn uniform_brush(&self) -> Option<u32>
The one brush kind every record of the segment paints with, if they agree; zero when none of them has a brush.