Introduce a new ToggleGraphicsProfiler command (#7607)

On macOS, this will enable or disable the Metal HUD at runtime. Note
that this only works when Zed is bundled because it requires to set the
`MetalHudEnabled` key in the Info.plist.

Release Notes:

- Added a new `ToggleGraphicsProfiler` command that can be used as an
action (or via the `Help -> Toggle Graphics Profiler` menu) to
investigate graphics performance.
This commit is contained in:
Antonio Scandurra 2024-02-09 13:29:40 +01:00 committed by GitHub
parent 04e1641a29
commit 0cebf68306
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 53 additions and 6 deletions

View file

@ -118,6 +118,7 @@ actions!(
ToggleRightDock,
ToggleBottomDock,
CloseAllDocks,
ToggleGraphicsProfiler,
]
);
@ -3395,6 +3396,7 @@ impl Workspace {
workspace.reopen_closed_item(cx).detach();
}),
)
.on_action(|_: &ToggleGraphicsProfiler, cx| cx.toggle_graphics_profiler())
}
#[cfg(any(test, feature = "test-support"))]