Initial profiling support for Iced.
This commit is contained in:
parent
ba20ac8e49
commit
c5cd236b73
20 changed files with 357 additions and 35 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue