Initial profiling support for Iced.
This commit is contained in:
parent
ba20ac8e49
commit
c5cd236b73
20 changed files with 357 additions and 35 deletions
|
|
@ -7,6 +7,9 @@ use glow::HasContext;
|
|||
use iced_graphics::layer;
|
||||
use iced_native::Rectangle;
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
use iced_profiling::info_span;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Pipeline {
|
||||
Core(core::Pipeline),
|
||||
|
|
@ -42,6 +45,9 @@ impl Pipeline {
|
|||
scale: f32,
|
||||
bounds: Rectangle<u32>,
|
||||
) {
|
||||
#[cfg(feature = "trace")]
|
||||
let _ = info_span!("Glow::Quad", "DRAW").enter();
|
||||
|
||||
match self {
|
||||
Pipeline::Core(pipeline) => {
|
||||
pipeline.draw(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue