Updated tst_nodestest to use the DirtyForceUpdate flag.

Changed test to use DirtyForceUpdate instead of DirtyAll, and
removed DirtyRenderOrder and DirtyAll enums which should not
be used.
This commit is contained in:
Kim Motoyoshi Kalland 2011-06-23 14:13:24 +02:00
parent 098b7fb0ac
commit a9853d2ffe
4 changed files with 4 additions and 8 deletions

View File

@ -452,8 +452,6 @@ QSGShaderEffectNode* QSGCustomParticle::buildCustomNode()
if (s.vertexCode.isEmpty())
s.vertexCode = qt_particles_default_vertex_code;
m_material.setProgramSource(s);
node->markDirty(QSGNode::DirtyMaterial);
node->markDirty(QSGNode::DirtyAll);
return node;
}

View File

@ -458,9 +458,9 @@ void QSGNode::markDirty(DirtyFlags flags)
int geometryCountDiff = 0;
if (flags & DirtyNodeAdded)
geometryCountDiff = m_subtreeGeometryCount;
geometryCountDiff += m_subtreeGeometryCount;
if (flags & DirtyNodeRemoved)
geometryCountDiff = -m_subtreeGeometryCount;
geometryCountDiff -= m_subtreeGeometryCount;
QSGNode *p = m_parent;
while (p) {

View File

@ -82,11 +82,9 @@ public:
DirtyNodeAdded = 0x0004,
DirtyNodeRemoved = 0x0008,
DirtyGeometry = 0x0010,
DirtyRenderOrder = 0x0020,
DirtyMaterial = 0x0040,
DirtyOpacity = 0x0080,
DirtyForceUpdate = 0x0100,
DirtyAll = 0xffff,
DirtyPropagationMask = DirtyMatrix
| DirtyClipList

View File

@ -196,14 +196,14 @@ public:
if (renderer->rootNode()->parent()) {
// Mark the root dirty to build a clean state from the root and down
renderer->rootNode()->markDirty(QSGNode::DirtyAll);
renderer->rootNode()->markDirty(QSGNode::DirtyForceUpdate);
}
renderer->renderScene();
if (renderer->rootNode()->parent()) {
// Mark the parent of the root dirty to force the root and down to be updated.
renderer->rootNode()->parent()->markDirty(QSGNode::DirtyAll);
renderer->rootNode()->parent()->markDirty(QSGNode::DirtyForceUpdate);
}
}