diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-06-23 14:13:24 +0200 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-06-23 14:53:32 +0200 |
commit | a9853d2ffe177bf98eb7610b58bb1bbb44743510 (patch) | |
tree | 7923f9359306bd54c14dde5673d33fce154ba6ed | |
parent | 098b7fb0ac84dbe65a8861cce76e036f0b9198d6 (diff) |
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.
-rw-r--r-- | src/declarative/particles/qsgcustomparticle.cpp | 2 | ||||
-rw-r--r-- | src/declarative/scenegraph/coreapi/qsgnode.cpp | 4 | ||||
-rw-r--r-- | src/declarative/scenegraph/coreapi/qsgnode.h | 2 | ||||
-rw-r--r-- | tests/auto/declarative/node/tst_nodestest.cpp | 4 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp index 09cfdda143..46f160ddf4 100644 --- a/src/declarative/particles/qsgcustomparticle.cpp +++ b/src/declarative/particles/qsgcustomparticle.cpp @@ -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; } diff --git a/src/declarative/scenegraph/coreapi/qsgnode.cpp b/src/declarative/scenegraph/coreapi/qsgnode.cpp index bfe17ca72b..b295d25b70 100644 --- a/src/declarative/scenegraph/coreapi/qsgnode.cpp +++ b/src/declarative/scenegraph/coreapi/qsgnode.cpp @@ -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) { diff --git a/src/declarative/scenegraph/coreapi/qsgnode.h b/src/declarative/scenegraph/coreapi/qsgnode.h index cee6b76869..80def63f21 100644 --- a/src/declarative/scenegraph/coreapi/qsgnode.h +++ b/src/declarative/scenegraph/coreapi/qsgnode.h @@ -82,11 +82,9 @@ public: DirtyNodeAdded = 0x0004, DirtyNodeRemoved = 0x0008, DirtyGeometry = 0x0010, - DirtyRenderOrder = 0x0020, DirtyMaterial = 0x0040, DirtyOpacity = 0x0080, DirtyForceUpdate = 0x0100, - DirtyAll = 0xffff, DirtyPropagationMask = DirtyMatrix | DirtyClipList diff --git a/tests/auto/declarative/node/tst_nodestest.cpp b/tests/auto/declarative/node/tst_nodestest.cpp index a1b0a6ac91..fc159b98e9 100644 --- a/tests/auto/declarative/node/tst_nodestest.cpp +++ b/tests/auto/declarative/node/tst_nodestest.cpp @@ -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); } } |