diff options
author | 2022-11-29 19:50:58 -0800 | |
---|---|---|
committer | 2023-01-09 18:52:38 +0100 | |
commit | c5cd236b7380c3689792934aeaecd2942713fa67 (patch) | |
tree | c27a0e6ecfdec7936791ee70e07ce19c713095cd /wgpu/src/image.rs | |
parent | ba20ac8e49aedfa9d822d71784587d0635cec4f8 (diff) | |
download | iced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.gz iced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.bz2 iced-c5cd236b7380c3689792934aeaecd2942713fa67.zip |
Initial profiling support for Iced.
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r-- | wgpu/src/image.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 390bad90..ed81e0c6 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -23,6 +23,9 @@ use iced_native::image; #[cfg(feature = "svg")] use iced_native::svg; +#[cfg(feature = "trace")] +use iced_profiling::info_span; + #[derive(Debug)] pub struct Pipeline { #[cfg(feature = "image")] @@ -289,6 +292,9 @@ impl Pipeline { target: &wgpu::TextureView, _scale: f32, ) { + #[cfg(feature = "trace")] + let _ = info_span!("Wgpu::Image", "DRAW").entered(); + let instances: &mut Vec<Instance> = &mut Vec::new(); #[cfg(feature = "image")] |