MCPcopy Create free account
hub / github.com/baldurk/renderdoc / OnCaptureLoaded

Method OnCaptureLoaded

qrenderdoc/Windows/MainWindow.cpp:2227–2291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2225}
2226
2227void MainWindow::OnCaptureLoaded()
2228{
2229 // at first only allow the default save for temporary captures. It should be disabled if we have
2230 // loaded a 'permanent' capture from disk and haven't made any changes. It will be enabled as soon
2231 // as any changes are made.
2232 ui->action_Save_Capture_Inplace->setEnabled(m_Ctx.IsCaptureTemporary());
2233 ui->action_Save_Capture_As->setEnabled(true);
2234 ui->action_Close_Capture->setEnabled(true);
2235 ui->menu_Export_As->setEnabled(true);
2236
2237 // don't allow changing context while capture is open
2238 contextChooser->setEnabled(false);
2239
2240 statusProgress->setVisible(false);
2241
2242 // don't allow capture recompress on opened images
2243 QString driver = m_Ctx.Replay().GetCaptureAccess()->DriverName();
2244 bool is_image = driver == lit("Image");
2245 ui->action_Recompress_Capture->setEnabled(!is_image);
2246
2247 updateToolsMenuOptions();
2248
2249 ui->action_Start_Replay_Loop->setEnabled(true);
2250
2251 ui->action_Open_RGP_Profile->setEnabled(false);
2252 ui->action_Create_RGP_Profile->setEnabled(m_Ctx.APIProps().rgpCapture && m_Ctx.IsCaptureLocal());
2253 m_Ctx.Replay().AsyncInvoke([this](IReplayController *) {
2254 bool hasAMDGRPPorfile =
2255 (m_Ctx.Replay().GetCaptureAccess()->FindSectionByType(SectionType::AMDRGPProfile) >= 0);
2256
2257 GUIInvoke::call(this, [this, hasAMDGRPPorfile]() {
2258 ui->action_Open_RGP_Profile->setEnabled(hasAMDGRPPorfile);
2259 });
2260 });
2261
2262 setCaptureHasErrors(!m_Ctx.DebugMessages().empty());
2263
2264 ui->action_Resolve_Symbols->setEnabled(false);
2265
2266 m_Ctx.Replay().AsyncInvoke([this](IReplayController *) {
2267 bool hasResolver = m_Ctx.Replay().GetCaptureAccess()->HasCallstacks();
2268
2269 GUIInvoke::call(this, [this, hasResolver]() {
2270 ui->action_Resolve_Symbols->setEnabled(hasResolver);
2271 ui->action_Resolve_Symbols->setText(hasResolver ? tr("Resolve Symbols")
2272 : tr("Resolve Symbols - None in capture"));
2273 });
2274 });
2275
2276 SetTitle();
2277
2278 PopulateRecentCaptureFiles();
2279
2280 if(m_Ctx.HasEventBrowser())
2281 ToolWindowManager::raiseToolWindow(m_Ctx.GetEventBrowser()->Widget());
2282
2283 // the first time we load a capture with annotations, show/bring the annotation viewer to the
2284 // front. After that, if the user hides it we won't show it again.

Callers 2

LoadCaptureMethod · 0.45
AddCaptureViewerMethod · 0.45

Calls 15

GetCaptureAccessMethod · 0.80
trFunction · 0.50
IsCaptureTemporaryMethod · 0.45
DriverNameMethod · 0.45
IsCaptureLocalMethod · 0.45
AsyncInvokeMethod · 0.45
FindSectionByTypeMethod · 0.45
emptyMethod · 0.45
HasCallstacksMethod · 0.45
setTextMethod · 0.45
HasEventBrowserMethod · 0.45
WidgetMethod · 0.45

Tested by

no test coverage detected