Remove unnecessary cast_slice in iced_tiny_skia

This commit is contained in:
Héctor Ramón Jiménez 2023-02-27 16:30:54 +01:00
parent c1ff803b8f
commit 151daf95b7
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -123,7 +123,7 @@ impl Pipeline {
.allocate(glyph.cache_key, color, &mut swash)
{
let pixmap = tiny_skia::PixmapRef::from_bytes(
bytemuck::cast_slice(&buffer),
buffer,
placement.width,
placement.height,
)
@ -266,7 +266,6 @@ impl GlyphCache {
return None;
}
// TODO: Cache glyph rasterization
let mut buffer = vec![0u32; glyph_size];
match image.content {