Provide scenegraph backend API for marking scenegraph nodes dirty.
authorMichael Brasser <michael.brasser@live.com>
Tue, 11 Feb 2014 14:41:36 +0000 (08:41 -0600)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 15 Feb 2014 13:57:45 +0000 (14:57 +0100)
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>
src/quick/scenegraph/coreapi/qsgnode.h
src/quick/scenegraph/coreapi/qsgrenderer_p.h

index 60e7652..f85184d 100644 (file)
@@ -161,6 +161,7 @@ protected:
 private:
     friend class QSGRootNode;
     friend class QSGBatchRenderer::Renderer;
+    friend class QSGRenderer;
 
     void init();
     void destroy();
index 43811e6..12ba381 100644 (file)
@@ -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;