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

Method run

qrenderdoc/Code/ReplayManager.cpp:440–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440void ReplayManager::run(int proxyRenderer, const QString &capturefile, const ReplayOptions &opts,
441 RENDERDOC_ProgressCallback progress)
442{
443 m_Renderer = NULL;
444
445 if(m_Remote)
446 {
447 rdctie(m_CreateResult, m_Renderer) =
448 m_Remote->OpenCapture(proxyRenderer, capturefile, opts, progress);
449 }
450 else
451 {
452 m_CaptureFile = RENDERDOC_OpenCaptureFile();
453
454 m_CreateResult = m_CaptureFile->OpenFile(capturefile, "rdc", NULL);
455
456 if(m_CreateResult.OK())
457 rdctie(m_CreateResult, m_Renderer) = m_CaptureFile->OpenCapture(opts, progress);
458 }
459
460 if(m_Renderer == NULL)
461 {
462 if(m_CaptureFile)
463 m_CaptureFile->Shutdown();
464 m_CaptureFile = NULL;
465
466 return;
467 }
468
469 qInfo() << "QRenderDoc - renderer created for" << capturefile;
470
471 m_Running = true;
472
473 // main render command loop
474 while(m_Running)
475 {
476 InvokeHandle *cmd = NULL;
477
478 // wait for the condition to be woken, grab top of current queue,
479 // unlock again.
480 {
481 QMutexLocker autolock(&m_RenderLock);
482 if(m_RenderQueue.isEmpty())
483 m_RenderCondition.wait(&m_RenderLock, 10);
484
485 if(!m_RenderQueue.isEmpty())
486 cmd = m_RenderQueue.dequeue();
487 }
488
489 if(cmd == NULL)
490 continue;
491
492 if(cmd->method != NULL)
493 {
494 {
495 QMutexLocker lock(&m_TimerLock);
496 m_CommandTimer.start();
497 m_CommandTag = cmd->tag;

Callers 5

mainFunction · 0.45
tickFunction · 0.45
AnimationFunction · 0.45
uFunction · 0.45
ltFunction · 0.45

Calls 15

rdctieFunction · 0.85
OpenFileMethod · 0.80
methodMethod · 0.80
GetFatalErrorStatusMethod · 0.80
QStringFunction · 0.50
OpenCaptureMethod · 0.45
ShutdownMethod · 0.45
isEmptyMethod · 0.45
waitMethod · 0.45
startMethod · 0.45
invalidateMethod · 0.45

Tested by

no test coverage detected