2020-06-03 10:10:20 +10:00
|
|
|
use piet_gpu_derive::piet_gpu;
|
|
|
|
|
|
|
|
piet_gpu! {
|
|
|
|
#[gpu_write]
|
|
|
|
mod pathseg {
|
2021-03-18 02:34:21 +11:00
|
|
|
struct PathCubic {
|
2020-06-10 09:01:47 +10:00
|
|
|
p0: [f32; 2],
|
|
|
|
p1: [f32; 2],
|
|
|
|
p2: [f32; 2],
|
|
|
|
p3: [f32; 2],
|
|
|
|
path_ix: u32,
|
2021-03-18 02:34:21 +11:00
|
|
|
// trans_ix is the transform index. It is 1-based, 0 means no transformation.
|
2021-03-15 22:28:04 +11:00
|
|
|
trans_ix: u32,
|
2021-03-18 02:34:21 +11:00
|
|
|
// Halfwidth in both x and y for binning. For strokes only.
|
2020-06-10 09:01:47 +10:00
|
|
|
stroke: [f32; 2],
|
|
|
|
}
|
2020-06-03 10:10:20 +10:00
|
|
|
enum PathSeg {
|
|
|
|
Nop,
|
2021-03-18 02:34:21 +11:00
|
|
|
Cubic(TagFlags, PathCubic),
|
2020-06-03 10:10:20 +10:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|