diff options
Diffstat (limited to 'tiny_skia')
| -rw-r--r-- | tiny_skia/src/geometry.rs | 5 | ||||
| -rw-r--r-- | tiny_skia/src/raster.rs | 6 | 
2 files changed, 6 insertions, 5 deletions
| diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs index 117daf41..02b6e1b9 100644 --- a/tiny_skia/src/geometry.rs +++ b/tiny_skia/src/geometry.rs @@ -1,9 +1,10 @@  use crate::core::text::LineHeight;  use crate::core::{Pixels, Point, Radians, Rectangle, Size, Vector}; +use crate::graphics::cache::{self, Cached};  use crate::graphics::geometry::fill::{self, Fill};  use crate::graphics::geometry::stroke::{self, Stroke};  use crate::graphics::geometry::{self, Path, Style}; -use crate::graphics::{Cached, Gradient, Text}; +use crate::graphics::{Gradient, Text};  use crate::Primitive;  use std::rc::Rc; @@ -32,7 +33,7 @@ impl Cached for Geometry {          Self::Cache(cache.clone())      } -    fn cache(self, _previous: Option<Cache>) -> Cache { +    fn cache(self, _group: cache::Group, _previous: Option<Cache>) -> Cache {          match self {              Self::Live {                  primitives, diff --git a/tiny_skia/src/raster.rs b/tiny_skia/src/raster.rs index 176b0da9..907fce7c 100644 --- a/tiny_skia/src/raster.rs +++ b/tiny_skia/src/raster.rs @@ -71,8 +71,8 @@ impl Pipeline {  #[derive(Debug, Default)]  struct Cache { -    entries: FxHashMap<u64, Option<Entry>>, -    hits: FxHashSet<u64>, +    entries: FxHashMap<raster::Id, Option<Entry>>, +    hits: FxHashSet<raster::Id>,  }  impl Cache { @@ -83,7 +83,7 @@ impl Cache {          let id = handle.id();          if let hash_map::Entry::Vacant(entry) = self.entries.entry(id) { -            let image = graphics::image::load(handle).ok()?.into_rgba8(); +            let image = graphics::image::load(handle).ok()?;              let mut buffer =                  vec![0u32; image.width() as usize * image.height() as usize]; | 
