diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-30 09:23:09 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-30 17:03:43 +0300 |
commit | 3ead9b2b3605580554cc330d2d2525f405e9c779 (patch) | |
tree | 634650b941210833444cf0947eb4682c513e5d70 /source/blender/compositor/intern/COM_NodeOperation.h | |
parent | 5a6d5d20de2cfa43d14d67970b2f2eb24048b230 (diff) |
Cleanup: Replace virtual methods with bitflags.
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeOperation.h')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeOperation.h | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index 6ad97e5eba6..1a299160cee 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -182,6 +182,8 @@ struct NodeOperationFlags { */ bool open_cl : 1; + bool single_threaded : 1; + /** * Does the operation needs a viewer border. * Basically, setting border need to happen for only operations @@ -210,10 +212,22 @@ struct NodeOperationFlags { bool is_set_operation : 1; bool is_write_buffer_operation : 1; bool is_read_buffer_operation : 1; + bool is_proxy_operation : 1; + bool is_viewer_operation : 1; + bool is_preview_operation : 1; + + /** + * When set additional data conversion operations are added to + * convert the data. SocketProxyOperation don't always need to do data conversions. + * + * By default data conversions are enabled. + */ + bool use_datatype_conversion : 1; NodeOperationFlags() { complex = false; + single_threaded = false; open_cl = false; use_render_border = false; use_viewer_border = false; @@ -221,6 +235,10 @@ struct NodeOperationFlags { is_set_operation = false; is_read_buffer_operation = false; is_write_buffer_operation = false; + is_proxy_operation = false; + is_viewer_operation = false; + is_preview_operation = false; + use_datatype_conversion = true; } }; @@ -330,11 +348,6 @@ class NodeOperation { return false; } - virtual int isSingleThreaded() - { - return false; - } - void setbNodeTree(const bNodeTree *tree) { this->m_btree = tree; @@ -442,24 +455,6 @@ class NodeOperation { return CompositorPriority::Low; } - virtual bool isViewerOperation() const - { - return false; - } - virtual bool isPreviewOperation() const - { - return false; - } - virtual bool isProxyOperation() const - { - return false; - } - - virtual bool useDatatypeConversion() const - { - return true; - } - inline bool isBraked() const { return this->m_btree->test_break(this->m_btree->tbh); |