summaryrefslogtreecommitdiffstats
path: root/src/render/framegraph
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-09-18 08:38:54 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-09-20 15:54:10 +0200
commite915e062668155436eaf7dce461f31b0058d77c5 (patch)
treeb580b687e1855aca2d472d2acfe75f42e8153719 /src/render/framegraph
parent86dfa6f8fea866928bef729d159586578412a46c (diff)
QFrameGraphNode: remove message sync left overs
Change-Id: I798111ea9e2fda76e40c1588c18d6e7e80d34ab7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/render/framegraph')
-rw-r--r--src/render/framegraph/framegraphnode.cpp32
-rw-r--r--src/render/framegraph/framegraphnode_p.h3
-rw-r--r--src/render/framegraph/qframegraphnode.cpp9
3 files changed, 0 insertions, 44 deletions
diff --git a/src/render/framegraph/framegraphnode.cpp b/src/render/framegraph/framegraphnode.cpp
index c30b155e8..93531fd7d 100644
--- a/src/render/framegraph/framegraphnode.cpp
+++ b/src/render/framegraph/framegraphnode.cpp
@@ -66,15 +66,6 @@ FrameGraphNode::~FrameGraphNode()
{
}
-// TO DO: Remove once all FG nodes have been converted to direct sync
-void FrameGraphNode::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change)
-{
- // Set up the parent child relationship and enabled state
- const auto creationChange = qSharedPointerCast<QFrameGraphNodeCreatedChangeBase>(change);
- setParentId(creationChange->parentFrameGraphNodeId());
- markDirty(AbstractRenderer::FrameGraphDirty);
-}
-
void FrameGraphNode::setFrameGraphManager(FrameGraphManager *manager)
{
if (m_manager != manager)
@@ -130,29 +121,6 @@ QVector<FrameGraphNode *> FrameGraphNode::children() const
return children;
}
-// TO DO: Remove once all FG nodes have been converted to direct sync
-void FrameGraphNode::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
-{
- switch (e->type()) {
-
- case Qt3DCore::PropertyUpdated: {
- Qt3DCore::QPropertyUpdatedChangePtr propertyChange = qSharedPointerCast<Qt3DCore::QPropertyUpdatedChange>(e);
- if (propertyChange->propertyName() == QByteArrayLiteral("enabled")) {
- d_func()->m_enabled = propertyChange->value().toBool();
- markDirty(AbstractRenderer::FrameGraphDirty);
- } else if (propertyChange->propertyName() == QByteArrayLiteral("parentFrameGraphUpdated")) {
- auto newParent = propertyChange->value().value<Qt3DCore::QNodeId>();
- setParentId(newParent);
- markDirty(AbstractRenderer::AllDirty);
- }
- break;
- }
- default:
- markDirty(AbstractRenderer::AllDirty);
- break;
- }
-}
-
void FrameGraphNode::cleanup()
{
setParentId({});
diff --git a/src/render/framegraph/framegraphnode_p.h b/src/render/framegraph/framegraphnode_p.h
index aa07877a1..846dc8060 100644
--- a/src/render/framegraph/framegraphnode_p.h
+++ b/src/render/framegraph/framegraphnode_p.h
@@ -121,13 +121,10 @@ public:
void cleanup();
- void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) override;
-
void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
protected:
FrameGraphNode(FrameGraphNodeType nodeType, QBackendNode::Mode mode = QBackendNode::ReadOnly);
- void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) override;
private:
FrameGraphNodeType m_nodeType;
diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp
index aa7767e0b..1ef81a081 100644
--- a/src/render/framegraph/qframegraphnode.cpp
+++ b/src/render/framegraph/qframegraphnode.cpp
@@ -258,15 +258,6 @@ Qt3DCore::QNodeCreatedChangeBasePtr QFrameGraphNode::createNodeCreationChange()
void QFrameGraphNode::onParentChanged(QObject *)
{
- // TO DO: Remove once all node have been converted to use direct sync
- const auto parentID = parentFrameGraphNode() ? parentFrameGraphNode()->id() : Qt3DCore::QNodeId();
- auto parentChange = Qt3DCore::QPropertyUpdatedChangePtr::create(id());
- parentChange->setPropertyName("parentFrameGraphUpdated");
- parentChange->setValue(QVariant::fromValue(parentID));
- const bool blocked = blockNotifications(false);
- notifyObservers(parentChange);
- blockNotifications(blocked);
-
// Direct sync update request
Q_D(QFrameGraphNode);
d->update();