diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-09-25 10:32:53 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-09-25 11:57:49 +0100 |
commit | 96e9d67e40f1410f41cd9bae401948f10e448893 (patch) | |
tree | 28d76842407061c8eaeed8f66ccb7ed59cdb5273 | |
parent | 4d2b9252f7d679ac2ffc8b5b4ee9fad9970b46c5 (diff) |
Update frontend data after job
Data computed by the core aspect needs to be available for the
render aspect when it runs. This forces the update to the front node
from the job thread which should be save currently since the main thread
is blocked, there's no other core aspect jobs running, and the render
aspect job depends on this one.
Change-Id: I9483066d272eec02456f9c02f8e4a34acad35e0b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r-- | src/core/jobs/calcboundingvolumejob.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/jobs/calcboundingvolumejob.cpp b/src/core/jobs/calcboundingvolumejob.cpp index 4e9339912..5e1b3362d 100644 --- a/src/core/jobs/calcboundingvolumejob.cpp +++ b/src/core/jobs/calcboundingvolumejob.cpp @@ -306,6 +306,13 @@ void CalculateBoundingVolumeJob::run() m_results.push_back(res); // How do we push it to the backends???? } } + + // This is needed so that the matching job in the render aspect gets the right data. + // It is currently safe since the main thread is locked, there's no other + // core aspect jobs in existence, and other aspect jobs only access backend data. + // TODO: find a way for aspects to pass around data, or create groups of jobs + // that need to run first, sync, then process next group. + postFrame(nullptr); } void CalculateBoundingVolumeJob::postFrame(QAspectEngine *aspectEngine) |