From af386fd0a3de432337ee9cdaa4d3661e98bd4105 Mon Sep 17 00:00:00 2001 From: Alec Deason Date: Sat, 10 Jun 2023 13:18:42 -0700 Subject: Upgrade resvg to 0.34 and tiny_skia to 0.10 --- tiny_skia/src/raster.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tiny_skia/src/raster.rs') diff --git a/tiny_skia/src/raster.rs b/tiny_skia/src/raster.rs index 3887ec8d..74b21d4a 100644 --- a/tiny_skia/src/raster.rs +++ b/tiny_skia/src/raster.rs @@ -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 { -- cgit