diff --git a/Cargo.lock b/Cargo.lock index d6f15f5a8f83..a5e65623f355 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1559,7 +1559,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "bytemuck", "serde", @@ -1568,7 +1568,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "bytemuck", "cocoa", @@ -1593,6 +1593,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "web-time", "wgpu", "winapi", "winit", @@ -1601,7 +1602,7 @@ dependencies = [ [[package]] name = "egui" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "accesskit", "ahash", @@ -1617,7 +1618,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "bytemuck", "egui", @@ -1626,6 +1627,7 @@ dependencies = [ "puffin", "thiserror", "type-map", + "web-time", "wgpu", "winit", ] @@ -1633,7 +1635,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "accesskit_winit", "arboard", @@ -1662,7 +1664,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "egui", "ehttp", @@ -1677,7 +1679,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "bytemuck", "egui", @@ -1694,7 +1696,7 @@ dependencies = [ [[package]] name = "egui_plot" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "egui", ] @@ -1737,7 +1739,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "emath" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "bytemuck", "serde", @@ -1838,7 +1840,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.25.0" -source = "git+https://github.com/emilk/egui.git?rev=6b0782c96b76349da9be785d0e9054f87cd7b00a#6b0782c96b76349da9be785d0e9054f87cd7b00a" +source = "git+https://github.com/emilk/egui.git?rev=ab39420c2933d2e402999043375b64e7cf0ee9ed#ab39420c2933d2e402999043375b64e7cf0ee9ed" dependencies = [ "ab_glyph", "ahash", diff --git a/Cargo.toml b/Cargo.toml index a6cb7b723064..1927bbb002fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -277,13 +277,13 @@ debug = true # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -eframe = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -egui = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -egui_plot = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 -emath = { git = "https://github.com/emilk/egui.git", rev = "6b0782c96b76349da9be785d0e9054f87cd7b00a" } # egui master 2024-01-26 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +eframe = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +egui = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +egui_plot = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 +emath = { git = "https://github.com/emilk/egui.git", rev = "ab39420c2933d2e402999043375b64e7cf0ee9ed" } # egui master 2024-01-29 # Useful while developing: # ecolor = { path = "../../egui/crates/ecolor" } diff --git a/crates/re_space_view_time_series/src/space_view_class.rs b/crates/re_space_view_time_series/src/space_view_class.rs index dc7696bb6b3f..a2f6e0f756b0 100644 --- a/crates/re_space_view_time_series/src/space_view_class.rs +++ b/crates/re_space_view_time_series/src/space_view_class.rs @@ -314,7 +314,7 @@ impl SpaceViewClass for TimeSeriesSpaceView { .x_axis_formatter(move |time, _, _| { format_time( time_type, - time as i64 + time_offset, + time.value as i64 + time_offset, time_zone_for_timestamps, ) }) diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index 7d6d41b21fde..92990f4d6414 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -1,5 +1,3 @@ -use web_time::Instant; - use re_data_source::{DataSource, FileContents}; use re_entity_db::entity_db::EntityDb; use re_log_types::{FileSource, LogMsg, StoreKind}; @@ -1103,7 +1101,10 @@ impl eframe::App for App { } fn update(&mut self, egui_ctx: &egui::Context, frame: &mut eframe::Frame) { - let frame_start = Instant::now(); + if let Some(seconds) = frame.info().cpu_usage { + self.frame_time_history + .add(egui_ctx.input(|i| i.time), seconds); + } // Temporarily take the `StoreHub` out of the Viewer so it doesn't interfere with mutability let mut store_hub = self.store_hub.take().unwrap(); @@ -1237,12 +1238,6 @@ impl eframe::App for App { open_url.new_tab = true; } }); - - // Frame time measurer - must be last - self.frame_time_history.add( - egui_ctx.input(|i| i.time), - frame_start.elapsed().as_secs_f32(), - ); } #[cfg(target_arch = "wasm32")] diff --git a/crates/re_viewer/src/ui/memory_panel.rs b/crates/re_viewer/src/ui/memory_panel.rs index 6fe51f103d68..2401bbd9816d 100644 --- a/crates/re_viewer/src/ui/memory_panel.rs +++ b/crates/re_viewer/src/ui/memory_panel.rs @@ -540,8 +540,8 @@ impl MemoryPanel { egui_plot::Plot::new("mem_history_plot") .min_size(egui::Vec2::splat(200.0)) .label_formatter(|name, value| format!("{name}: {}", format_bytes(value.y))) - .x_axis_formatter(|time, _, _| format!("{time} s")) - .y_axis_formatter(|bytes, _, _| format_bytes(bytes)) + .x_axis_formatter(|time, _, _| format!("{} s", time.value)) + .y_axis_formatter(|bytes, _, _| format_bytes(bytes.value)) .show_x(false) .legend(egui_plot::Legend::default().position(egui_plot::Corner::LeftTop)) .include_y(0.0)