aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/qquickcustomaffector
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-03-08 10:13:15 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-08 09:37:21 +0000
commit350a74ec69b535df07ad7ca45415090749c75293 (patch)
tree911d3c17b0af4f733f5449c6796014cfc9ac0d04 /tests/auto/particles/qquickcustomaffector
parent922e9d6b0c7ae1acdae4986e8000ad9a693b7469 (diff)
Particles: Shrink QQuickParticleData by 2 pointers.
Samegame creates about 23,000 particles, so this reduces the memory by ~180kb on 32bit, so ~360kb on 64bit. Change-Id: I0581524ab232b474c5d43abeabd7ebf6174e740f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/particles/qquickcustomaffector')
-rw-r--r--tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
index 50d28f8e77..fb15af4dd1 100644
--- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
+++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
@@ -63,7 +63,7 @@ void tst_qquickcustomaffector::test_basic()
if (d->t == -1)
continue; //Particle data unused
//in CI the whole simulation often happens at once, so dead particles end up missing out
- if (!d->stillAlive())
+ if (!d->stillAlive(system))
continue; //parameters no longer get set once you die
QCOMPARE(d->x, 100.f);
@@ -95,13 +95,13 @@ void tst_qquickcustomaffector::test_move()
foreach (QQuickParticleData *d, system->groupData[0]->data) {
if (d->t == -1)
continue; //Particle data unused
- if (!d->stillAlive())
+ if (!d->stillAlive(system))
continue; //parameters no longer get set once you die
- QVERIFY(myFuzzyCompare(d->curX(), 50.0));
- QVERIFY(myFuzzyCompare(d->curY(), 50.0));
- QVERIFY(myFuzzyCompare(d->curVX(), 50.0));
- QVERIFY(myFuzzyCompare(d->curVY(), 50.0));
+ QVERIFY(myFuzzyCompare(d->curX(system), 50.0));
+ QVERIFY(myFuzzyCompare(d->curY(system), 50.0));
+ QVERIFY(myFuzzyCompare(d->curVX(system), 50.0));
+ QVERIFY(myFuzzyCompare(d->curVY(system), 50.0));
QVERIFY(myFuzzyCompare(d->curAX(), 50.0));
QVERIFY(myFuzzyCompare(d->curAY(), 50.0));
QCOMPARE(d->lifeSpan, 0.5f);