previewautocacher: run passthroughs before TryRender

This commit is contained in:
itsmattkc
2022-07-28 14:49:10 -07:00
parent 8476c9dbeb
commit 5a067f57da
+11 -11
View File
@@ -193,6 +193,17 @@ void PreviewAutoCacher::VideoRendered()
{
RenderTicketWatcher* watcher = static_cast<RenderTicketWatcher*>(sender());
// Process passthroughs no matter what, if the viewer was switched, the passthrough map would be
// cleared anyway
QVector<RenderTicketPtr> tickets = video_immediate_passthroughs_.take(watcher);
foreach (RenderTicketPtr t, tickets) {
if (watcher->HasResult()) {
t->Finish(watcher->Get());
} else {
t->Finish();
}
}
// If the task list doesn't contain this watcher, presumably it was cleared as a result of a
// viewer switch, so we'll completely ignore this watcher
auto it = video_tasks_.find(watcher);
@@ -214,17 +225,6 @@ void PreviewAutoCacher::VideoRendered()
TryRender();
}
// Process passthroughs no matter what, if the viewer was switched, the passthrough map would be
// cleared anyway
QVector<RenderTicketPtr> tickets = video_immediate_passthroughs_.take(watcher);
foreach (RenderTicketPtr t, tickets) {
if (watcher->HasResult()) {
t->Finish(watcher->Get());
} else {
t->Finish();
}
}
delete watcher;
}