aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2014-02-11 08:41:36 -0600
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-15 14:57:45 +0100
commit1ec525e7e011a8881ec7d90e34876d5bf5fb2fc8 (patch)
treead48e9f2a5ca11e032bbd1f1913fa3ded9413fae
parent586ebf6c55ed095c2627185d90153ccfdc51c3d2 (diff)
Provide scenegraph backend API for marking scenegraph nodes dirty.
Prior to Qt 5.2 tracking of dirty state was automatically handled by QSGNode. With Qt 5.2 this approach has changed. Moving forward render state is ideally tracked outside of QSGNode; however, we continue to provide a way to track it in the node itself, to support custom renderers and the default node updater. Change-Id: I78907caee1b64b94a2bae2d8b577210f1955a431 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h1
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer_p.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 60e7652e7a..f85184db90 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -161,6 +161,7 @@ protected:
private:
friend class QSGRootNode;
friend class QSGBatchRenderer::Renderer;
+ friend class QSGRenderer;
void init();
void destroy();
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
index 43811e6d5e..12ba381064 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
@@ -148,6 +148,7 @@ protected:
void addNodesToPreprocess(QSGNode *node);
void removeNodesToPreprocess(QSGNode *node);
+ void markNodeDirtyState(QSGNode *node, QSGNode::DirtyState state) { node->m_dirtyState |= state; }
QColor m_clear_color;
ClearMode m_clear_mode;