diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-09-10 11:23:46 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-10-03 10:37:56 +0000 |
commit | 93866c8a742d5b6c1c612c17b71f2e5e57fe6b74 (patch) | |
tree | f01d83d0b1220d78754469db792289c5aada86ed | |
parent | aee10edf33ccb1faf3179b23b44a2ad48bf4d0f0 (diff) |
Don't send change notifications for unneeded properties
The backend doesn't need to know about the rotation angles used to
update the transform. Saves about 3% of time on the main thread
related to mallocing the property change notifications.
Change-Id: I784baf705cdd697ba860dc7a0c2e0e1c9ee467ec
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | tests/manual/bigscene-cpp/entity.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/manual/bigscene-cpp/entity.cpp b/tests/manual/bigscene-cpp/entity.cpp index 9a4ecae3b..a4625a9b2 100644 --- a/tests/manual/bigscene-cpp/entity.cpp +++ b/tests/manual/bigscene-cpp/entity.cpp @@ -106,7 +106,9 @@ void Entity::setTheta(float theta) return; m_theta = theta; + const bool wasBlocked = blockNotifications(true); emit thetaChanged(theta); + blockNotifications(wasBlocked); updateTransform(); } @@ -116,7 +118,9 @@ void Entity::setPhi(float phi) return; m_phi = phi; + const bool wasBlocked = blockNotifications(true); emit phiChanged(phi); + blockNotifications(wasBlocked); updateTransform(); } |