From f3268fcb2a4e73d99dbd66aa5e262a118b5a5480 Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Tue, 6 Aug 2019 15:30:01 +0100 Subject: Do direct notification of backend nodes 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 Reviewed-by: Paul Lemire --- .../animation/qcallbackmapping/tst_qcallbackmapping.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp') 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(); - 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); } { -- cgit v1.2.3