summaryrefslogtreecommitdiffstats
path: root/src/core/jobs/qaspectjob_p.h
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-02-13 13:38:37 +0000
committerMike Krus <mike.krus@kdab.com>2020-02-14 07:03:06 +0000
commit92ac289664d50d2905be528c98fc82ecf6e2fcd1 (patch)
tree65e8fb8056da621831498bf61f1399f0c6f7ae48 /src/core/jobs/qaspectjob_p.h
parent6aef82519bdc538c2fee67047bd990485715c721 (diff)
Add flag to jobs to indicate if they need to run or not
Once aspect jobs are inserted in the queue, they will always run, but some of them don't actually have anything to do at every frame. Ideally, when building a graph of jobs, you would include only jobs that are required. However this makes building the graph more complicated. This introduces a method on the private job pimple which indicated if the job actually has something to do or not. When the scheduler is ready to run a job, it will call that method. If there's nothing to do, then the job will be skipped and the dependent jobs (if any) run instead. Change-Id: Iaa8d3d064f03d8c0bab407879a9acea292a06784 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/jobs/qaspectjob_p.h')
-rw-r--r--src/core/jobs/qaspectjob_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h
index ddad09c86..5b72e64ee 100644
--- a/src/core/jobs/qaspectjob_p.h
+++ b/src/core/jobs/qaspectjob_p.h
@@ -72,6 +72,7 @@ public:
static QAspectJobPrivate *get(QAspectJob *job);
+ virtual bool isRequired();
virtual void postFrame(QAspectManager *aspectManager);
QVector<QWeakPointer<QAspectJob> > m_dependencies;