diff options
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r-- | src/core/delegated_frame_node.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index a4b2a4036..e49bc553f 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -209,6 +209,7 @@ protected: QVector<QSGNode*> *m_sceneGraphNodes; }; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) class DelegatedNodeTreeUpdater : public DelegatedNodeTreeHandler { public: @@ -303,6 +304,7 @@ public: private: QVector<QSGNode*>::iterator m_nodeIterator; }; +#endif class DelegatedNodeTreeCreator : public DelegatedNodeTreeHandler { @@ -872,8 +874,13 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData, // We first compare if the render passes from the previous frame data are structurally // equivalent to the render passes in the current frame data. If they are, we are going // to reuse the old nodes. Otherwise, we will delete the old nodes and build a new tree. +#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) cc::DelegatedFrameData *previousFrameData = m_chromiumCompositorData->previousFrameData.get(); const bool buildNewTree = !areRenderPassStructuresEqual(frameData, previousFrameData) || m_sceneGraphNodes.empty(); +#else + // No updates possible with old scenegraph nodes + const bool buildNewTree = true; +#endif m_chromiumCompositorData->previousFrameData = nullptr; SGObjects previousSGObjects; @@ -887,11 +894,13 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData, delete oldChain; m_sceneGraphNodes.clear(); nodeHandler.reset(new DelegatedNodeTreeCreator(&m_sceneGraphNodes, apiDelegate)); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) } else { // Save the texture strong refs so they only go out of scope when the method returns and // the new vector of texture strong refs has been filled. qSwap(m_sgObjects.textureStrongRefs, textureStrongRefs); nodeHandler.reset(new DelegatedNodeTreeUpdater(&m_sceneGraphNodes)); +#endif } // The RenderPasses list is actually a tree where a parent RenderPass is connected // to its dependencies through a RenderPassId reference in one or more RenderPassQuads. |