Upgrade resvg to 0.34 and tiny_skia to 0.10
This commit is contained in:
parent
9f2be29a28
commit
af386fd0a3
7 changed files with 85 additions and 51 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue