diff options
author | 2023-01-09 19:10:45 +0100 | |
---|---|---|
committer | 2023-01-09 19:10:45 +0100 | |
commit | 07d755c6a270bd46fe9752ed57b3ceaddda1f081 (patch) | |
tree | cbd8f75d8cd6beeb3c04cbedc0127f2e17b70f56 /glow/src/quad.rs | |
parent | ba20ac8e49aedfa9d822d71784587d0635cec4f8 (diff) | |
parent | 2e5dc1f37a32e1f3aaa6db2aa9cf9c95e83bff42 (diff) | |
download | iced-07d755c6a270bd46fe9752ed57b3ceaddda1f081.tar.gz iced-07d755c6a270bd46fe9752ed57b3ceaddda1f081.tar.bz2 iced-07d755c6a270bd46fe9752ed57b3ceaddda1f081.zip |
Merge pull request #1565 from bungoboingo/feat/tracing
[Feature] Profiling
Diffstat (limited to 'glow/src/quad.rs')
-rw-r--r-- | glow/src/quad.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/glow/src/quad.rs b/glow/src/quad.rs index d9f1c6ae..67d9a098 100644 --- a/glow/src/quad.rs +++ b/glow/src/quad.rs @@ -7,6 +7,9 @@ use glow::HasContext; use iced_graphics::layer; use iced_native::Rectangle; +#[cfg(feature = "tracing")] +use tracing::info_span; + #[derive(Debug)] pub enum Pipeline { Core(core::Pipeline), @@ -42,6 +45,9 @@ impl Pipeline { scale: f32, bounds: Rectangle<u32>, ) { + #[cfg(feature = "tracing")] + let _ = info_span!("Glow::Quad", "DRAW").enter(); + match self { Pipeline::Core(pipeline) => { pipeline.draw( |