mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
address initial review feedback
* move "formerly piet-gpu" text from title to body in readme * use [T;N]::map() for affine conversion functions
This commit is contained in:
parent
628bc9566d
commit
093af31e05
|
@ -1,6 +1,6 @@
|
|||
# vello (formerly piet-gpu)
|
||||
# vello
|
||||
|
||||
This repo contains the new prototype for a new compute-centric 2D GPU renderer.
|
||||
This repo contains the new prototype for a new compute-centric 2D GPU renderer (formerly known as piet-gpu).
|
||||
|
||||
It succeeds the previous prototype, [piet-metal].
|
||||
|
||||
|
|
|
@ -620,26 +620,11 @@ impl<'a> PathBuilder<'a> {
|
|||
}
|
||||
|
||||
fn affine_to_f32(affine: &Affine) -> [f32; 6] {
|
||||
let c = affine.as_coeffs();
|
||||
[
|
||||
c[0] as f32,
|
||||
c[1] as f32,
|
||||
c[2] as f32,
|
||||
c[3] as f32,
|
||||
c[4] as f32,
|
||||
c[5] as f32,
|
||||
]
|
||||
affine.as_coeffs().map(|value| value as f32)
|
||||
}
|
||||
|
||||
fn affine_from_f32(coeffs: &[f32; 6]) -> Affine {
|
||||
Affine::new([
|
||||
coeffs[0] as f64,
|
||||
coeffs[1] as f64,
|
||||
coeffs[2] as f64,
|
||||
coeffs[3] as f64,
|
||||
coeffs[4] as f64,
|
||||
coeffs[5] as f64,
|
||||
])
|
||||
Affine::new(coeffs.map(|value| value as f64))
|
||||
}
|
||||
|
||||
fn point_to_f32(point: Point) -> [f32; 2] {
|
||||
|
|
Loading…
Reference in a new issue