summaryrefslogtreecommitdiffstats
path: root/src/imports/sensors
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-05-30 10:07:29 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-05 21:15:26 +0200
commit102bdf35b13f1b60df26052341ebc5a2833518c7 (patch)
treed603ff2116af12f4d3a64a8a8987107b83e0383e /src/imports/sensors
parente8237a3d19e90c31af6d5a6c5e3a2f7815740226 (diff)
iOS: change accelerometer to use QTimer for polling
According to the docs (CMMotionManager class reference) there are two ways of interacting with the accelerometer; Either through the callback API (NSOperationQueue), or peridic sampling (polling). Our first implementation of IOSAcceleometer used the former technique, which turns out to have bad performance when using the sensor together with a fine-grained QTimer. And this case is pretty common when using sensors together with e.g QML. Reading through the docs more carefully, they recommend using the polling technique when creating games instead since the NSOperationQueue introduces some overhead. So this patch does that, change the implementation to use QTimer based polling. And this solves the performance issues found. Change-Id: Ifde0d2292302467afb8db90a954ef45f3238350e Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/imports/sensors')
0 files changed, 0 insertions, 0 deletions