Avoid full cache invalidation in render worker after LUT processor is ready

InvalidateAll() on the OCIO LUT node triggered the worker's
PreviewAutoCacher to re-cache the entire timeline, causing the main
process to freeze while waiting for frames. Only invalidate in the
main GUI process so the viewer refreshes; the worker will naturally
use the new processor on its next render request.
This commit is contained in:
2026-07-13 10:19:30 +08:00
parent 800859b0ef
commit 63a4008ce4
+10 -2
View File
@@ -20,6 +20,7 @@
#include "ociolut.h"
#include <QCoreApplication>
#include <QFileInfo>
#include <QMetaObject>
@@ -207,8 +208,15 @@ void OCIOLutNode::SetProcessorResult(ColorProcessorPtr processor,
last_processor_ = processor;
set_processor(processor);
// The processor has changed, ensure any cached frames are re-rendered.
InvalidateAll(kTextureInput);
// The processor has changed. In the main GUI process we need to invalidate
// cached frames so the viewer refreshes automatically. In the render worker
// process, a full invalidation can trigger an expensive re-cache of the
// entire timeline, so we skip it; the next render request will naturally
// pick up the new processor.
if (QCoreApplication::applicationName() !=
QStringLiteral("olive-render-worker")) {
InvalidateAll(kTextureInput);
}
}
OCIOLutNode::GenerateProcessorTask::GenerateProcessorTask(