Krita Source Code Documentation
Loading...
Searching...
No Matches
KisFakeRunnableStrokeJobsExecutor Class Reference

#include <KisFakeRunnableStrokeJobsExecutor.h>

+ Inheritance diagram for KisFakeRunnableStrokeJobsExecutor:

Public Types

enum  Flag { None = 0x0 , AllowBarrierJobs = 0x1 }
 

Public Member Functions

void addRunnableJobs (const QVector< KisRunnableStrokeJobDataBase * > &list) override
 
 KisFakeRunnableStrokeJobsExecutor ()
 
 KisFakeRunnableStrokeJobsExecutor (Flags flags)
 
- Public Member Functions inherited from KisRunnableStrokeJobsInterface
void addRunnableJob (KisRunnableStrokeJobDataBase *data)
 
template<typename T >
void addRunnableJobs (const QVector< T * > &list)
 
virtual ~KisRunnableStrokeJobsInterface ()
 

Private Attributes

Flags m_flags
 

Detailed Description

Definition at line 13 of file KisFakeRunnableStrokeJobsExecutor.h.

Member Enumeration Documentation

◆ Flag

Normally, barrier jobs are not allowed in the fake jobs executor, because we cannot guarantee that all the update jobs are finished on the scheduler, so their guarantee is kind of "broken". Passing AllowBarrierJobs flag explicitly disables this check, which passes responsibility for the broken guarantees to the caller.

Enumerator
None 
AllowBarrierJobs 

Definition at line 24 of file KisFakeRunnableStrokeJobsExecutor.h.

Constructor & Destructor Documentation

◆ KisFakeRunnableStrokeJobsExecutor() [1/2]

KisFakeRunnableStrokeJobsExecutor::KisFakeRunnableStrokeJobsExecutor ( )

◆ KisFakeRunnableStrokeJobsExecutor() [2/2]

KisFakeRunnableStrokeJobsExecutor::KisFakeRunnableStrokeJobsExecutor ( Flags flags)

Definition at line 19 of file KisFakeRunnableStrokeJobsExecutor.cpp.

20 : m_flags(flags)
21{
22}

Member Function Documentation

◆ addRunnableJobs()

void KisFakeRunnableStrokeJobsExecutor::addRunnableJobs ( const QVector< KisRunnableStrokeJobDataBase * > & list)
overridevirtual

Implements KisRunnableStrokeJobsInterface.

Definition at line 24 of file KisFakeRunnableStrokeJobsExecutor.cpp.

25{
26 Q_FOREACH (KisRunnableStrokeJobDataBase *data, list) {
28 (data->sequentiality() != KisStrokeJobData::BARRIER && "barrier jobs are not supported on the fake executor"));
29 KIS_SAFE_ASSERT_RECOVER_NOOP(data->exclusivity() != KisStrokeJobData::EXCLUSIVE && "exclusive jobs are not supported on the fake executor");
30
31 data->run();
32 }
33
34 qDeleteAll(list);
35}
virtual void run()=0
Sequentiality sequentiality()
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130

References AllowBarrierJobs, KisStrokeJobData::BARRIER, KisStrokeJobData::EXCLUSIVE, KisStrokeJobData::exclusivity(), KIS_SAFE_ASSERT_RECOVER_NOOP, m_flags, KisRunnable::run(), and KisStrokeJobData::sequentiality().

Member Data Documentation

◆ m_flags

Flags KisFakeRunnableStrokeJobsExecutor::m_flags
private

Definition at line 37 of file KisFakeRunnableStrokeJobsExecutor.h.


The documentation for this class was generated from the following files: