diff options
| author | 2020-01-17 20:48:49 +0100 | |
|---|---|---|
| committer | 2020-02-25 13:27:03 +0100 | |
| commit | 2f695ef9803c9c08f64961f1b9902a661a385160 (patch) | |
| tree | 1bdac539b758e6c101ffcb7a3312daf42b8b5036 /wgpu/src/image/vector.rs | |
| parent | c0996923c6aab39bb61ca6d3310149c66a73fac8 (diff) | |
| download | iced-2f695ef9803c9c08f64961f1b9902a661a385160.tar.gz iced-2f695ef9803c9c08f64961f1b9902a661a385160.tar.bz2 iced-2f695ef9803c9c08f64961f1b9902a661a385160.zip | |
Updated shaders and removed debug_stub_derive dependency
Diffstat (limited to 'wgpu/src/image/vector.rs')
| -rw-r--r-- | wgpu/src/image/vector.rs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index 9bddcc2b..a8746566 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -3,14 +3,9 @@ use iced_native::svg; use std::{ collections::{HashMap, HashSet}, }; -use debug_stub_derive::*; -#[derive(DebugStub)] pub enum Svg { - Loaded( - #[debug_stub="ReplacementValue"] - resvg::usvg::Tree - ), + Loaded(resvg::usvg::Tree), NotFound, } @@ -27,10 +22,17 @@ impl Svg { } } -#[derive(DebugStub)] +impl std::fmt::Debug for Svg { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Svg::Loaded(_) => write!(f, "Svg::Loaded"), + Svg::NotFound => write!(f, "Svg::NotFound"), + } + } +} + pub struct Cache { svgs: HashMap<u64, Svg>, - #[debug_stub="ReplacementValue"] rasterized: HashMap<(u64, u32, u32), ImageAllocation>, svg_hits: HashSet<u64>, rasterized_hits: HashSet<(u64, u32, u32)>, @@ -144,3 +146,9 @@ impl Cache { self.rasterized_hits.clear(); } } + +impl std::fmt::Debug for Cache { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "vector::Cache") + } +}
\ No newline at end of file |
