From c5cd236b7380c3689792934aeaecd2942713fa67 Mon Sep 17 00:00:00 2001 From: Bingus Date: Tue, 29 Nov 2022 19:50:58 -0800 Subject: Initial profiling support for Iced. --- glow/src/image.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'glow/src/image.rs') diff --git a/glow/src/image.rs b/glow/src/image.rs index 521a01e7..351b98fa 100644 --- a/glow/src/image.rs +++ b/glow/src/image.rs @@ -21,6 +21,9 @@ use glow::HasContext; use std::cell::RefCell; +#[cfg(feature = "trace")] +use iced_profiling::info_span; + #[derive(Debug)] pub(crate) struct Pipeline { program: ::Program, @@ -148,6 +151,9 @@ impl Pipeline { images: &[layer::Image], layer_bounds: Rectangle, ) { + #[cfg(feature = "trace")] + let _ = info_span!("Glow::Image", "DRAW").entered(); + unsafe { gl.use_program(Some(self.program)); gl.bind_vertex_array(Some(self.vertex_array)); -- cgit