diff options
author | Mike Krus <mike.krus@kdab.com> | 2019-08-06 15:30:01 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2019-08-28 06:30:29 +0200 |
commit | f3268fcb2a4e73d99dbd66aa5e262a118b5a5480 (patch) | |
tree | 374bd9ace2fccaa33534f338950185368ab5598b /tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp | |
parent | 91dc1e1a61651a82a0ee5ce6ad3b24e82f526be6 (diff) |
Do direct notification of backend nodeswip/refactor
Since aspect manager is now on main thread, we can directly update
backend nodes safely. Track nodes which have changed properties and
notify the backend nodes as part of the frame loop.
This avoid allocating and delivering many change messages.
To follow:
- implement on all nodes
- look at backend to frontend syncing
- figure out what to do with non property messages (components
added/removed, commands, ...)
Change-Id: Ia0c442b0528e728c4324d168200bae021bc29266
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp')
-rw-r--r-- | tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp index 78dff8b64..d217f3b0f 100644 --- a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp +++ b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp @@ -164,23 +164,18 @@ private Q_SLOTS: { // WHEN mapping.setChannelName(QStringLiteral("Scale")); - QCoreApplication::processEvents(); // THEN - QCOMPARE(arbiter.events.size(), 1); - auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); - QCOMPARE(change->propertyName(), "channelName"); - QCOMPARE(change->type(), Qt3DCore::PropertyUpdated); - QCOMPARE(change->value().toString(), mapping.channelName()); + QCOMPARE(arbiter.dirtyNodes.size(), 1); + QCOMPARE(arbiter.dirtyNodes.front(), &mapping); - arbiter.events.clear(); + arbiter.dirtyNodes.clear(); // WHEN mapping.setChannelName(QStringLiteral("Scale")); - QCoreApplication::processEvents(); // THEN - QCOMPARE(arbiter.events.size(), 0); + QCOMPARE(arbiter.dirtyNodes.size(), 0); } { |