diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-11-17 16:36:53 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-14 04:49:01 +0100 |
commit | 9db40605bc3c1ddb2715a53724c6fbc4d026e68b (patch) | |
tree | 13caa1b07671dab322ad37cf4d1decca6d795651 /src/quick/scenegraph/coreapi/qsgrenderer.cpp | |
parent | 5676c6c02a5c3869036dbdbebd2338fd994b9473 (diff) |
Made QSGNode flags togglable and added StaticSubtreeGeometry.
The UsePreprocess and ChildrenDoNotOverlap flags could previously
only be set during node initialization. They can now be toggled.
This change also introduces the StaticSubtreeGeometry flag which is
meant to be used to indicate that all the nodes in the sub-tree
have static matrices and vertex data.
Change-Id: I3b182b81f7010aea636f8f654ef22dab19bc6b29
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgrenderer.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index b22631afae..1b4f5da435 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp @@ -325,15 +325,18 @@ void QSGRenderer::setClearColor(const QColor &color) pointer. */ -void QSGRenderer::nodeChanged(QSGNode *node, QSGNode::DirtyFlags flags) +void QSGRenderer::nodeChanged(QSGNode *node, QSGNode::DirtyState state) { - Q_UNUSED(node); - Q_UNUSED(flags); - - if (flags & QSGNode::DirtyNodeAdded) + if (state & QSGNode::DirtyNodeAdded) addNodesToPreprocess(node); - if (flags & QSGNode::DirtyNodeRemoved) + if (state & QSGNode::DirtyNodeRemoved) removeNodesToPreprocess(node); + if (state & QSGNode::DirtyUsePreprocess) { + if (node->flags() & QSGNode::UsePreprocess) + m_nodes_to_preprocess.insert(node); + else + m_nodes_to_preprocess.remove(node); + } if (!m_changed_emitted && !m_is_rendering) { // Premature overoptimization to avoid excessive signal emissions |