summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image/raster.rs
diff options
context:
space:
mode:
authorLibravatar Malte Veerman <malte.veerman@gmail.com>2020-01-17 20:48:49 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-25 13:27:03 +0100
commit2f695ef9803c9c08f64961f1b9902a661a385160 (patch)
tree1bdac539b758e6c101ffcb7a3312daf42b8b5036 /wgpu/src/image/raster.rs
parentc0996923c6aab39bb61ca6d3310149c66a73fac8 (diff)
downloadiced-2f695ef9803c9c08f64961f1b9902a661a385160.tar.gz
iced-2f695ef9803c9c08f64961f1b9902a661a385160.tar.bz2
iced-2f695ef9803c9c08f64961f1b9902a661a385160.zip
Updated shaders and removed debug_stub_derive dependency
Diffstat (limited to 'wgpu/src/image/raster.rs')
-rw-r--r--wgpu/src/image/raster.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/wgpu/src/image/raster.rs b/wgpu/src/image/raster.rs
index bca2ebda..648df0ff 100644
--- a/wgpu/src/image/raster.rs
+++ b/wgpu/src/image/raster.rs
@@ -3,9 +3,7 @@ use iced_native::image;
use std::{
collections::{HashMap, HashSet},
};
-use debug_stub_derive::*;
-#[derive(DebugStub)]
pub enum Memory {
Host(::image::ImageBuffer<::image::Bgra<u8>, Vec<u8>>),
Device(ImageAllocation),
@@ -24,6 +22,17 @@ impl Memory {
}
}
+impl std::fmt::Debug for Memory {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ match self {
+ Memory::Host(_) => write!(f, "Memory::Host"),
+ Memory::Device(_) => write!(f, "Memory::Device"),
+ Memory::NotFound => write!(f, "Memory::NotFound"),
+ Memory::Invalid => write!(f, "Memory::Invalid"),
+ }
+ }
+}
+
#[derive(Debug)]
pub struct Cache {
map: HashMap<u64, Memory>,