summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/render/framegraph/framegraphnode.cpp1
-rw-r--r--tests/auto/render/framegraphnode/tst_framegraphnode.cpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/render/framegraph/framegraphnode.cpp b/src/render/framegraph/framegraphnode.cpp
index 58ff05dc0..40d8fca3d 100644
--- a/src/render/framegraph/framegraphnode.cpp
+++ b/src/render/framegraph/framegraphnode.cpp
@@ -123,6 +123,7 @@ QVector<FrameGraphNode *> FrameGraphNode::children() const
void FrameGraphNode::cleanup()
{
setParentId({});
+ markDirty(AbstractRenderer::FrameGraphDirty);
}
void FrameGraphNode::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
diff --git a/tests/auto/render/framegraphnode/tst_framegraphnode.cpp b/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
index 770f7e72d..a7cea2ef2 100644
--- a/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
+++ b/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
@@ -266,6 +266,24 @@ private Q_SLOTS:
}
}
+ void checCleanupMarksDirty()
+ {
+ // GIVEN
+ TestRenderer renderer;
+ Qt3DRender::Render::FrameGraphNode *backendFGNode = new MyFrameGraphNode();
+
+ backendFGNode->setRenderer(&renderer);
+
+ // THEN
+ QVERIFY(renderer.dirtyBits() == 0);
+
+ // WHEN
+ backendFGNode->cleanup();
+
+ // THEN
+ QVERIFY(renderer.dirtyBits() & Qt3DRender::Render::AbstractRenderer::FrameGraphDirty);
+ }
+
};
QTEST_MAIN(tst_FrameGraphNode)