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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
|
||||
private slots:
|
||||
void ThreadCompletedFrame(NodeDependency path, qint64 job_time, QByteArray hash, QVariant value);
|
||||
void ThreadCompletedDownload(NodeDependency dep, qint64 job_time, QByteArray hash);
|
||||
void ThreadCompletedDownload(NodeDependency dep, qint64 job_time, QByteArray hash, bool texture_existed);
|
||||
void ThreadSkippedFrame(NodeDependency dep, qint64 job_time, QByteArray hash);
|
||||
void ThreadHashAlreadyExists(NodeDependency dep, qint64 job_time, QByteArray hash);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ NodeValueTable VideoRenderWorker::RenderInternal(const NodeDependency& path, con
|
||||
if (!(operating_mode_ & kRenderOnly)) {
|
||||
|
||||
// Emit only the hash
|
||||
emit CompletedDownload(path, job_time, hash);
|
||||
emit CompletedDownload(path, job_time, hash, false);
|
||||
|
||||
} else if ((operating_mode_ & kHashOnly) && frame_cache_->HasHash(hash, video_params_.format())) {
|
||||
|
||||
@@ -74,7 +74,7 @@ NodeValueTable VideoRenderWorker::RenderInternal(const NodeDependency& path, con
|
||||
|
||||
if (operating_mode_ & kDownloadOnly) {
|
||||
// Signal that this job is complete
|
||||
emit CompletedDownload(path, job_time, hash);
|
||||
emit CompletedDownload(path, job_time, hash, !texture.isNull());
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
signals:
|
||||
void CompletedFrame(NodeDependency path, qint64 job_time, QByteArray hash, QVariant value);
|
||||
|
||||
void CompletedDownload(NodeDependency path, qint64 job_time, QByteArray hash);
|
||||
void CompletedDownload(NodeDependency path, qint64 job_time, QByteArray hash, bool texture_existed);
|
||||
|
||||
void HashAlreadyBeingCached(NodeDependency path, qint64 job_time, QByteArray hash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user