diff options
author | 2022-11-29 19:50:58 -0800 | |
---|---|---|
committer | 2023-01-09 18:52:38 +0100 | |
commit | c5cd236b7380c3689792934aeaecd2942713fa67 (patch) | |
tree | c27a0e6ecfdec7936791ee70e07ce19c713095cd /glow/src/triangle.rs | |
parent | ba20ac8e49aedfa9d822d71784587d0635cec4f8 (diff) | |
download | iced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.gz iced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.bz2 iced-c5cd236b7380c3689792934aeaecd2942713fa67.zip |
Initial profiling support for Iced.
Diffstat (limited to '')
-rw-r--r-- | glow/src/triangle.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/glow/src/triangle.rs b/glow/src/triangle.rs index d0205e08..11d24349 100644 --- a/glow/src/triangle.rs +++ b/glow/src/triangle.rs @@ -9,6 +9,9 @@ use iced_graphics::triangle::{ColoredVertex2D, Vertex2D}; use glow::HasContext; use std::marker::PhantomData; +#[cfg(feature = "trace")] +use iced_profiling::info_span; + const DEFAULT_VERTICES: usize = 1_000; const DEFAULT_INDICES: usize = 1_000; @@ -58,6 +61,9 @@ impl Pipeline { transformation: Transformation, scale_factor: f32, ) { + #[cfg(feature = "trace")] + let _ = info_span!("Glow::Triangle", "DRAW").enter(); + unsafe { gl.enable(glow::MULTISAMPLE); gl.enable(glow::SCISSOR_TEST); |