summaryrefslogtreecommitdiffstats
path: root/glow/src/image.rs
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2022-11-29 19:50:58 -0800
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-09 18:52:38 +0100
commitc5cd236b7380c3689792934aeaecd2942713fa67 (patch)
treec27a0e6ecfdec7936791ee70e07ce19c713095cd /glow/src/image.rs
parentba20ac8e49aedfa9d822d71784587d0635cec4f8 (diff)
downloadiced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.gz
iced-c5cd236b7380c3689792934aeaecd2942713fa67.tar.bz2
iced-c5cd236b7380c3689792934aeaecd2942713fa67.zip
Initial profiling support for Iced.
Diffstat (limited to 'glow/src/image.rs')
-rw-r--r--glow/src/image.rs6
1 files changed, 6 insertions, 0 deletions
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: <glow::Context as HasContext>::Program,
@@ -148,6 +151,9 @@ impl Pipeline {
images: &[layer::Image],
layer_bounds: Rectangle<u32>,
) {
+ #[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));