Add support for profiling using tracy

This commit is contained in:
Ian Douglas Scott 2023-10-07 19:15:44 -07:00 committed by Victoria Brekenfeld
parent 929f4fcb05
commit a1c8b3aa3e
18 changed files with 122 additions and 5 deletions

View file

@ -358,6 +358,7 @@ impl<P: Program + Send + 'static + Clone> IcedElement<P> {
}
impl<P: Program + Send + 'static> IcedElementInternal<P> {
#[profiling::function]
fn update(&mut self, mut force: bool) -> Vec<Action<<P as Program>::Message>> {
while let Ok(message) = self.rx.try_recv() {
self.state.queue_message(message);
@ -691,6 +692,7 @@ impl<P: Program + Send + 'static> SpaceElement for IcedElement<P> {
RenderZindex::Shell as u8
}
#[profiling::function]
fn refresh(&self) {
let mut internal = self.0.lock().unwrap();
// makes partial borrows easier