diskmanager: clearing disk cache at runtime will correctly signal renderers

Clearing the disk cache in the preferences will correctly communicate to
renderers that those frames are now deleted.
This commit is contained in:
itsmattkc
2020-01-25 12:18:46 +11:00
parent c26070bfb5
commit 3f85ce8a7a
8 changed files with 45 additions and 13 deletions
+2 -2
View File
@@ -303,14 +303,14 @@ void VideoRenderBackend::ThreadCompletedFrame(NodeDependency path, qint64 job_ti
}
}
void VideoRenderBackend::ThreadCompletedDownload(NodeDependency dep, qint64 job_time, QByteArray hash)
void VideoRenderBackend::ThreadCompletedDownload(NodeDependency dep, qint64 job_time, QByteArray hash, bool texture_existed)
{
SetWorkerBusyState(static_cast<RenderWorker*>(sender()), false);
SetFrameHash(dep, hash, job_time);
// Register frame with the disk manager
if (operating_mode_ & VideoRenderWorker::kDownloadOnly) {
if (texture_existed && operating_mode_ & VideoRenderWorker::kDownloadOnly) {
DiskManager::instance()->CreatedFile(frame_cache()->CachePathName(hash, params_.format()), hash);
}