forge
Explore
Log in

Don't you dare go Hollow

tty: Rename vblank offset plot to time since presentation

Browse files at this commit

42bb79d7c3c4c9c006226c53167976ec78ae2c94Ivan MolodetskikhParent: 588e6d7
Makes it clearer what this is.
src/backend/tty.rsmodified+13 -11
@@ -92,8 +92,8 @@ struct Surface {
9292 vblank_frame: Option<tracy_client::Frame>,
9393 /// Frame name for the VBlank frame.
9494 vblank_frame_name: tracy_client::FrameName,
95- /// Plot name for the VBlank dispatch offset plot.
96- vblank_plot_name: tracy_client::PlotName,
95+ /// Plot name for the time since presentation plot.
96+ time_since_presentation_plot_name: tracy_client::PlotName,
9797 /// Plot name for the presentation misprediction plot.
9898 presentation_misprediction_plot_name: tracy_client::PlotName,
9999 sequence_delta_plot_name: tracy_client::PlotName,
@@ -586,8 +586,8 @@ impl Tty {
586586
587587 let vblank_frame_name =
588588 tracy_client::FrameName::new_leak(format!("vblank on {output_name}"));
589- let vblank_plot_name =
590- tracy_client::PlotName::new_leak(format!("{output_name} vblank dispatch offset, ms"));
589+ let time_since_presentation_plot_name =
590+ tracy_client::PlotName::new_leak(format!("{output_name} time since presentation, ms"));
591591 let presentation_misprediction_plot_name = tracy_client::PlotName::new_leak(format!(
592592 "{output_name} presentation misprediction, ms"
593593 ));
@@ -605,7 +605,7 @@ impl Tty {
605605 dmabuf_feedback,
606606 vblank_frame: None,
607607 vblank_frame_name,
608- vblank_plot_name,
608+ time_since_presentation_plot_name,
609609 presentation_misprediction_plot_name,
610610 sequence_delta_plot_name,
611611 };
@@ -694,15 +694,17 @@ impl Tty {
694694 format!("vblank on {name}, presentation time unknown")
695695 } else if presentation_time > now {
696696 let diff = presentation_time - now;
697- tracy_client::Client::running()
698- .unwrap()
699- .plot(surface.vblank_plot_name, -diff.as_secs_f64() * 1000.);
697+ tracy_client::Client::running().unwrap().plot(
698+ surface.time_since_presentation_plot_name,
699+ -diff.as_secs_f64() * 1000.,
700+ );
700701 format!("vblank on {name}, presentation is {diff:?} later")
701702 } else {
702703 let diff = now - presentation_time;
703- tracy_client::Client::running()
704- .unwrap()
705- .plot(surface.vblank_plot_name, diff.as_secs_f64() * 1000.);
704+ tracy_client::Client::running().unwrap().plot(
705+ surface.time_since_presentation_plot_name,
706+ diff.as_secs_f64() * 1000.,
707+ );
706708 format!("vblank on {name}, presentation was {diff:?} ago")
707709 };
708710 tracy_client::Client::running()