mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Add more puffin profile scopes to eframe (#3330)
* Add puffin profile scopes to the startup and running of eframe * puffin_profiler example: start puffin right away * cargo format let-else statements * More profile scopes * Add some `#[inline]` * Standardize puffin profile scope definitions * standardize again * Silence warning when puffin is disabled
This commit is contained in:
@@ -622,6 +622,7 @@ const STORAGE_EGUI_MEMORY_KEY: &str = "egui";
|
||||
const STORAGE_WINDOW_KEY: &str = "window";
|
||||
|
||||
pub fn load_window_settings(_storage: Option<&dyn epi::Storage>) -> Option<WindowSettings> {
|
||||
crate::profile_function!();
|
||||
#[cfg(feature = "persistence")]
|
||||
{
|
||||
epi::get_value(_storage?, STORAGE_WINDOW_KEY)
|
||||
@@ -631,6 +632,7 @@ pub fn load_window_settings(_storage: Option<&dyn epi::Storage>) -> Option<Windo
|
||||
}
|
||||
|
||||
pub fn load_egui_memory(_storage: Option<&dyn epi::Storage>) -> Option<egui::Memory> {
|
||||
crate::profile_function!();
|
||||
#[cfg(feature = "persistence")]
|
||||
{
|
||||
epi::get_value(_storage?, STORAGE_EGUI_MEMORY_KEY)
|
||||
|
||||
Reference in New Issue
Block a user