summaryrefslogtreecommitdiffstats
path: root/src/render/jobs/raycastingjob_p.h
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-10-01 14:21:20 +0100
committerMike Krus <mike.krus@kdab.com>2019-10-03 06:58:01 +0100
commitdf75e9c6d5cafc622adf36c026ece5b163e5e94d (patch)
tree8fa811ff1314468cafb71b9fea7737e27028efae /src/render/jobs/raycastingjob_p.h
parent537c1545e760a603be0b2cda83a329e43dcd23be (diff)
Update ray casting job to use direct sync
When the job is complete and we're back in the main thread, the job can look up the frontend node and deliver the hits directly. This saves allocating messages. Unit test changed quite a bit as it needs an aspect engine & manager to pass to the job for looking up nodes. Change-Id: I09d88c5e478fa387690af522c5798a37f3f2d9a6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/jobs/raycastingjob_p.h')
-rw-r--r--src/render/jobs/raycastingjob_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/jobs/raycastingjob_p.h b/src/render/jobs/raycastingjob_p.h
index 0bd8d445a..4b8b91ad5 100644
--- a/src/render/jobs/raycastingjob_p.h
+++ b/src/render/jobs/raycastingjob_p.h
@@ -68,6 +68,8 @@ namespace PickingUtils {
typedef QVector<RayCasting::QCollisionQueryResult::Hit> HitList;
}
+class RayCastingJobPrivate;
+
class Q_AUTOTEST_EXPORT RayCastingJob : public AbstractPickingJob
{
public:
@@ -80,6 +82,8 @@ protected:
void dispatchHits(RayCaster *rayCaster, const PickingUtils::HitList &sphereHits);
private:
+ Q_DECLARE_PRIVATE(RayCastingJob)
+
bool m_castersDirty;
bool m_oneEnabledAtLeast;
};