mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Make event selection 'soft' blocking instead of hard blocking
* Normally SetEventID is synchronous and blocking, and will stall the UI while it is processing. However we can at least pop up a progress dialog and allow the UI to function (if not be interactive due to the blocking progress dialog) when some other long-running task is delaying the processing on the replay thread.
This commit is contained in:
@@ -240,6 +240,12 @@ float ReplayManager::GetCurrentProcessingTime()
|
||||
return m_CommandTimer.isValid() ? double(m_CommandTimer.elapsed()) / 1000.0 : 0.0;
|
||||
}
|
||||
|
||||
QString ReplayManager::GetCurrentProcessingTag()
|
||||
{
|
||||
QMutexLocker lock(&m_TimerLock);
|
||||
return m_CommandTag;
|
||||
}
|
||||
|
||||
void ReplayManager::AsyncInvoke(const rdcstr &tag, ReplayManager::InvokeCallback m)
|
||||
{
|
||||
QString qtag(tag);
|
||||
@@ -486,6 +492,7 @@ void ReplayManager::run(int proxyRenderer, const QString &capturefile, const Rep
|
||||
{
|
||||
QMutexLocker lock(&m_TimerLock);
|
||||
m_CommandTimer.start();
|
||||
m_CommandTag = cmd->tag;
|
||||
}
|
||||
|
||||
cmd->method(m_Renderer);
|
||||
@@ -493,6 +500,7 @@ void ReplayManager::run(int proxyRenderer, const QString &capturefile, const Rep
|
||||
{
|
||||
QMutexLocker lock(&m_TimerLock);
|
||||
m_CommandTimer.invalidate();
|
||||
m_CommandTag = QString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user