Use Default implementation of renderer::Quad

This commit is contained in:
Héctor Ramón Jiménez 2024-01-20 12:25:07 +01:00
parent b7b457a575
commit 370b2f6df7
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
20 changed files with 63 additions and 116 deletions

View file

@ -267,22 +267,23 @@ impl Backend {
})
.collect();
if let Some(p) = tiny_skia::IntSize::from_wh(width, height)
.and_then(|size| {
tiny_skia::Pixmap::from_vec(
bytemuck::cast_vec(colors),
size,
)
})
{
if let Some(pixmap) = tiny_skia::IntSize::from_wh(
width, height,
)
.and_then(|size| {
tiny_skia::Pixmap::from_vec(
bytemuck::cast_vec(colors),
size,
)
}) {
pixels.draw_pixmap(
x as i32,
y as i32,
p.as_ref(),
&Default::default(),
Default::default(),
pixmap.as_ref(),
&tiny_skia::PixmapPaint::default(),
tiny_skia::Transform::default(),
None,
)
);
}
}