Skip to content

Commit

Permalink
puffin_viewer: Add ability to save and load recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Aug 24, 2021
1 parent dde6c60 commit 8c3fb95
Show file tree
Hide file tree
Showing 7 changed files with 392 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies
sudo apt-get install libgtk-3-dev # rfd dependencies
# make sure all code has been formatted with rustfmt
- run: rustup component add rustfmt
Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies
sudo apt-get install libgtk-3-dev # rfd dependencies
- name: cargo test build
uses: actions-rs/cargo@v1
with:
Expand Down
212 changes: 198 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ members = [
"puffin-imgui",
"puffin_viewer",
]

[patch.crates-io]
eframe = { git = "https://github.com/emilk/egui", rev = "f8a304225851165c817f7ceb3a0c2b9c78b2b177" }
egui = { git = "https://github.com/emilk/egui", rev = "f8a304225851165c817f7ceb3a0c2b9c78b2b177" }
8 changes: 8 additions & 0 deletions puffin_egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@ fn latest_frames() -> Frames {
}

impl ProfilerUi {
pub fn reset(&mut self) {
let options = self.options;
*self = Self {
options,
..Default::default()
};
}

/// Show an [`egui::Window`] with the profiler contents.
///
/// If you want to control the window yourself, use [`Self::ui`] instead.
Expand Down
Loading

0 comments on commit 8c3fb95

Please sign in to comment.