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

Method EmbedDependentFiles

qrenderdoc/Code/CaptureContext.cpp:2890–2933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2888}
2889
2890void CaptureContext::EmbedDependentFiles()
2891{
2892 if(!m_Replay.GetCaptureAccess())
2893 return;
2894
2895 // Always operate on the capture access (local or remote)
2896 QString tag = lit("replayEmbedDependenciesIntoCapture");
2897 bool done = false;
2898
2899 Replay().AsyncInvoke(tag, [this, &done](IReplayController *) {
2900 m_Replay.GetCaptureAccess()->EmbedDependenciesIntoCapture();
2901 done = true;
2902 });
2903
2904 // wait a short while before displaying the progress dialog
2905 for(int i = 0; !done && (i < 100 || m_Replay.GetCurrentProcessingTag().isEmpty() ||
2906 m_Replay.GetCurrentProcessingTag() == tag);
2907 i++)
2908 QThread::msleep(5);
2909
2910 ShowProgressDialog(m_MainWindow->Widget(), tr("Please wait, working..."),
2911 [&done]() { return done; });
2912
2913 // Local replay
2914 if(m_Replay.GetCaptureFile())
2915 return;
2916
2917 // Remote capture : no local capture file
2918 if(IsCaptureTemporary())
2919 return;
2920
2921 // Local capture file being replayed remotely : copy back from the remote
2922 if(IsCaptureLocal())
2923 {
2924 Replay().CopyCaptureFromRemote(m_RemoteFile, m_CaptureFile, m_MainWindow);
2925
2926 if(!QFile::exists(m_CaptureFile))
2927 {
2928 RDDialog::critical(m_MainWindow, tr("Failed to save capture"),
2929 tr("Capture couldn't be copied from remote."));
2930 return;
2931 }
2932 }
2933}
2934
2935void CaptureContext::RemoveDependentFiles()
2936{

Callers

nothing calls this directly

Calls 12

ShowProgressDialogFunction · 0.85
criticalFunction · 0.85
GetCaptureAccessMethod · 0.80
GetCaptureFileMethod · 0.80
trFunction · 0.70
existsFunction · 0.50
AsyncInvokeMethod · 0.45
isEmptyMethod · 0.45
WidgetMethod · 0.45
CopyCaptureFromRemoteMethod · 0.45

Tested by

no test coverage detected