Cleanup: Use enum class for CompositorPriority.

This commit is contained in:
Jeroen Bakker 2021-03-19 14:02:07 +01:00
parent 50c5435438
commit de504e6dec
7 changed files with 15 additions and 15 deletions

View File

@ -49,14 +49,14 @@ typedef enum CompositorQuality {
* \brief Possible priority settings
* \ingroup Execution
*/
typedef enum CompositorPriority {
enum class CompositorPriority {
/** \brief High quality setting */
COM_PRIORITY_HIGH = 2,
High = 2,
/** \brief Medium quality setting */
COM_PRIORITY_MEDIUM = 1,
Medium = 1,
/** \brief Low quality setting */
COM_PRIORITY_LOW = 0,
} CompositorPriority;
Low = 0,
};
// configurable items

View File

@ -177,10 +177,10 @@ void ExecutionSystem::execute()
WorkScheduler::start(this->m_context);
execute_groups(COM_PRIORITY_HIGH);
execute_groups(CompositorPriority::High);
if (!this->getContext().isFastCalculation()) {
execute_groups(COM_PRIORITY_MEDIUM);
execute_groups(COM_PRIORITY_LOW);
execute_groups(CompositorPriority::Medium);
execute_groups(CompositorPriority::Low);
}
WorkScheduler::finish();

View File

@ -326,7 +326,7 @@ class NodeOperation : public SocketReader {
*/
virtual CompositorPriority getRenderPriority() const
{
return COM_PRIORITY_LOW;
return CompositorPriority::Low;
}
/**

View File

@ -111,7 +111,7 @@ class CompositorOperation : public NodeOperation {
void deinitExecution();
CompositorPriority getRenderPriority() const
{
return COM_PRIORITY_MEDIUM;
return CompositorPriority::Medium;
}
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
void setUseAlphaInput(bool value)

View File

@ -66,7 +66,7 @@ class OutputSingleLayerOperation : public NodeOperation {
void deinitExecution();
CompositorPriority getRenderPriority() const
{
return COM_PRIORITY_LOW;
return CompositorPriority::Low;
}
bool isFileOutputOperation() const
@ -125,7 +125,7 @@ class OutputOpenExrMultiLayerOperation : public NodeOperation {
void deinitExecution();
CompositorPriority getRenderPriority() const
{
return COM_PRIORITY_LOW;
return CompositorPriority::Low;
}
bool isFileOutputOperation() const

View File

@ -157,5 +157,5 @@ void PreviewOperation::determineResolution(unsigned int resolution[2],
CompositorPriority PreviewOperation::getRenderPriority() const
{
return COM_PRIORITY_LOW;
return CompositorPriority::Low;
}

View File

@ -197,8 +197,8 @@ void ViewerOperation::updateImage(rcti *rect)
CompositorPriority ViewerOperation::getRenderPriority() const
{
if (this->isActiveViewerOutput()) {
return COM_PRIORITY_HIGH;
return CompositorPriority::High;
}
return COM_PRIORITY_LOW;
return CompositorPriority::Low;
}