#include <kis_update_job_item.h>
Definition at line 24 of file kis_update_job_item.h.
◆ Type
◆ KisUpdateJobItem()
◆ ~KisUpdateJobItem()
| KisUpdateJobItem::~KisUpdateJobItem |
( |
| ) |
|
|
inlineoverride |
◆ accessRect()
| const QRect & KisUpdateJobItem::accessRect |
( |
| ) |
const |
|
inline |
◆ changeRect()
| const QRect & KisUpdateJobItem::changeRect |
( |
| ) |
const |
|
inline |
◆ isRunning()
| bool KisUpdateJobItem::isRunning |
( |
| ) |
const |
|
inline |
◆ run()
| void KisUpdateJobItem::run |
( |
| ) |
|
|
inlineoverride |
◆ runImpl()
Here we break the idea of QThreadPool a bit. Ideally, we should split the jobs into distinct QRunnable objects and pass all of them to QThreadPool. That is a nice idea, but it doesn't work well when the jobs are small enough and the number of available cores is high (>4 cores). It this case the threads just tend to execute the job very quickly and go to sleep, which is an expensive operation.
To overcome this problem we try to bulk-process the jobs. In sigJobFinished() signal (which is DirectConnection), the context may add the job to ourselves(!!!), so we switch from "done" state into "running" again.
Definition at line 58 of file kis_update_job_item.h.
58 {
60
74 while (1) {
76
79 } else {
81 }
82
85 } else {
88
90#ifdef DEBUG_JOBS_SEQUENCE
95 } else {
97 }
98#endif
99
101 }
102 }
103
105
107
108
110
112
113
114
117 break;
118 }
119 }
120 }
virtual QString debugName() const =0
QReadWriteLock m_exclusiveJobLock
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
References KIS_ASSERT, and KIS_SAFE_ASSERT_RECOVER_RETURN.
◆ runMergeJob()
| void KisUpdateJobItem::runMergeJob |
( |
| ) |
|
|
inline |
Definition at line 124 of file kis_update_job_item.h.
124 {
127
128
129
130#ifdef DEBUG_JOBS_SEQUENCE
132
133#endif
134
136
139 }
void startMerge(KisBaseRectsWalker &walker, bool notifyClones=true)
KisNodeSP startNode() const
const QRect & changeRect() const
KisBaseRectsWalkerSP m_walker
void continueUpdate(const QRect &rc)
References KIS_SAFE_ASSERT_RECOVER_RETURN.
◆ setDone()
| void KisUpdateJobItem::setDone |
( |
| ) |
|
|
inline |
◆ setSpontaneousJob()
◆ setStrokeJob()
| bool KisUpdateJobItem::setStrokeJob |
( |
KisStrokeJob * | strokeJob | ) |
|
|
inline |
◆ setWalker()
◆ strokeJob()
◆ strokeJobSequentiality()
◆ testingSetDone()
| void KisUpdateJobItem::testingSetDone |
( |
| ) |
|
|
inlineprivate |
◆ type()
| Type KisUpdateJobItem::type |
( |
| ) |
const |
|
inline |
◆ walker()
◆ KisSimpleUpdateQueueTest
| friend class KisSimpleUpdateQueueTest |
|
friend |
◆ KisStrokesQueueTest
| friend class KisStrokesQueueTest |
|
friend |
◆ KisTestableUpdaterContext
Open walker and stroke job for the testing suite. Please, do not use it in production code.
Definition at line 217 of file kis_update_job_item.h.
◆ KisUpdaterContext
◆ KisUpdateSchedulerTest
| friend class KisUpdateSchedulerTest |
|
friend |
◆ m_accessRect
| QRect KisUpdateJobItem::m_accessRect |
|
private |
These rects cache actual values from the walker to eliminate concurrent access to a walker structure
Definition at line 260 of file kis_update_job_item.h.
◆ m_atomicType
◆ m_changeRect
| QRect KisUpdateJobItem::m_changeRect |
|
private |
◆ m_exclusive
| bool KisUpdateJobItem::m_exclusive {false} |
|
private |
◆ m_merger
◆ m_runnableJob
Runnable jobs part The job is owned by the context and deleted after completion
Definition at line 248 of file kis_update_job_item.h.
◆ m_strokeJobSequentiality
◆ m_updaterContext
◆ m_walker
The documentation for this class was generated from the following file: