Upgrade resvg to 0.34 and tiny_skia to 0.10

This commit is contained in:
Alec Deason 2023-06-10 13:18:42 -07:00 committed by Héctor Ramón Jiménez
parent 9f2be29a28
commit af386fd0a3
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 85 additions and 51 deletions

View file

@ -2,6 +2,7 @@ use crate::core::image as raster;
use crate::core::{Rectangle, Size};
use crate::graphics;
use bytemuck::cast;
use rustc_hash::{FxHashMap, FxHashSet};
use std::cell::RefCell;
use std::collections::hash_map;
@ -80,9 +81,8 @@ impl Cache {
for (i, pixel) in image.pixels().enumerate() {
let [r, g, b, a] = pixel.0;
buffer[i] = tiny_skia::ColorU8::from_rgba(b, g, r, a)
.premultiply()
.get();
buffer[i] = cast(tiny_skia::ColorU8::from_rgba(b, g, r, a)
.premultiply());
}
entry.insert(Some(Entry {