debug: Fixup feature compilation

This commit is contained in:
Victoria Brekenfeld 2025-01-03 20:09:13 +01:00 committed by Victoria Brekenfeld
parent 6be5009b37
commit 3926aee5b6
3 changed files with 10 additions and 2 deletions

View file

@ -99,6 +99,10 @@ impl Timings {
self.vrr = vrr;
}
pub fn vrr(&self) -> bool {
self.vrr
}
pub fn start_render(&mut self, clock: &Clock<Monotonic>) {
self.pending_frame = Some(PendingFrame {
render_start: clock.now(),

View file

@ -161,6 +161,7 @@ pub fn fps_ui<'a>(
}
});
}
ui.label(egui::RichText::new(format!("VRR: {}", timings.vrr())).code());
ui.label(egui::RichText::new(format!("FPS: {:>7.3}", avg_fps)).heading());
ui.label("Render Times:");
ui.label(egui::RichText::new(format!("avg: {:>7.6}", avg)).code());

View file

@ -656,8 +656,11 @@ impl CosmicMapped {
let mut elements = if let Some(debug) = self.debug.lock().unwrap().as_mut() {
let window = self.active_window();
let window_geo = window.geometry();
let (min_size, max_size, size) =
(window.min_size(), window.max_size(), window.geometry().size);
let (min_size, max_size, size) = (
window.min_size_without_ssd(),
window.max_size_without_ssd(),
window.geometry().size,
);
let area = Rectangle::<i32, Logical>::from_loc_and_size(
location.to_f64().to_logical(scale).to_i32_round(),