Remove automatic full-cache invalidation on LUT processor change
InvalidateAll() on the OCIO LUT node caused the preview autocacher to re-render the entire timeline, freezing the UI when switching LUT files. Instead, let the new processor be used naturally on the next render request (scrubbing/playback).
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include "ociolut.h"
|
#include "ociolut.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
|
||||||
@@ -208,15 +207,10 @@ void OCIOLutNode::SetProcessorResult(ColorProcessorPtr processor,
|
|||||||
last_processor_ = processor;
|
last_processor_ = processor;
|
||||||
set_processor(processor);
|
set_processor(processor);
|
||||||
|
|
||||||
// The processor has changed. In the main GUI process we need to invalidate
|
// NOTE: We intentionally do NOT call InvalidateAll() here. A full cache
|
||||||
// cached frames so the viewer refreshes automatically. In the render worker
|
// invalidation of the entire timeline freezes the UI while the preview
|
||||||
// process, a full invalidation can trigger an expensive re-cache of the
|
// autocacher re-renders every frame. The new processor will be picked up
|
||||||
// entire timeline, so we skip it; the next render request will naturally
|
// naturally on the next render request (e.g. scrubbing or playback).
|
||||||
// pick up the new processor.
|
|
||||||
if (QCoreApplication::applicationName() !=
|
|
||||||
QStringLiteral("olive-render-worker")) {
|
|
||||||
InvalidateAll(kTextureInput);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OCIOLutNode::GenerateProcessorTask::GenerateProcessorTask(
|
OCIOLutNode::GenerateProcessorTask::GenerateProcessorTask(
|
||||||
|
|||||||
Reference in New Issue
Block a user