render: only use cache in offline mode

This commit is contained in:
itsmattkc
2022-09-23 12:31:17 -07:00
parent b19730b1f5
commit 825b06f7a7
4 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ NodeValue NodeTraverser::GenerateRowValueElement(const Node *node, const QString
NodeValue value = table->TakeAt(value_index);
if (value.type() == NodeValue::kTexture) {
if (value.type() == NodeValue::kTexture && UseCache()) {
QMutexLocker locker(node->video_frame_cache()->mutex());
node->video_frame_cache()->LoadState();
+2
View File
@@ -149,6 +149,8 @@ protected:
Decoder::LoopMode loop_mode() const { return loop_mode_; }
virtual bool UseCache() const { return false; }
private:
void PreProcessRow(NodeValueRow &row);
+5
View File
@@ -649,4 +649,9 @@ void RenderProcessor::ConvertToReferenceSpace(TexturePtr destination, TexturePtr
render_ctx_->BlitColorManaged(ctj, destination.get());
}
bool RenderProcessor::UseCache() const
{
return static_cast<RenderMode::Mode>(ticket_->property("mode").toInt()) == RenderMode::kOffline;
}
}
+2
View File
@@ -67,6 +67,8 @@ protected:
virtual void ConvertToReferenceSpace(TexturePtr destination, TexturePtr source, const QString &input_cs) override;
virtual bool UseCache() const override;
private:
RenderProcessor(RenderTicketPtr ticket, Renderer* render_ctx, DecoderCache* decoder_cache, ShaderCache* shader_cache);