debug: Better frame graph
This commit is contained in:
parent
9823b42c20
commit
36cb2ac719
6 changed files with 215 additions and 72 deletions
|
|
@ -252,12 +252,17 @@ where
|
|||
.map(Into::into),
|
||||
);
|
||||
|
||||
#[cfg(feature = "debug")]
|
||||
if let Some(fps) = fps.as_mut() {
|
||||
fps.elements();
|
||||
}
|
||||
|
||||
renderer.bind(target).map_err(RenderError::Rendering)?;
|
||||
let res = damage_tracker.render_output(renderer, age, &elements, CLEAR_COLOR, None);
|
||||
|
||||
#[cfg(feature = "debug")]
|
||||
if let Some(fps) = fps.as_mut() {
|
||||
fps.end();
|
||||
fps.render();
|
||||
}
|
||||
|
||||
if let Some((source, buffers)) = screencopy {
|
||||
|
|
@ -303,6 +308,10 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "debug")]
|
||||
if let Some(fps) = fps.as_mut() {
|
||||
fps.screencopy();
|
||||
}
|
||||
}
|
||||
|
||||
res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue