From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- .../operations/COM_OutputFileOperation.h | 159 +++++++++++++-------- 1 file changed, 98 insertions(+), 61 deletions(-) (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.h') diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index de256e25ce0..3ffba6b374e 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -29,79 +29,116 @@ /* Writes the image to a single-layer file. */ class OutputSingleLayerOperation : public NodeOperation { -protected: - const RenderData *m_rd; - const bNodeTree *m_tree; - - ImageFormatData *m_format; - char m_path[FILE_MAX]; - - float *m_outputBuffer; - DataType m_datatype; - SocketReader *m_imageInput; - - const ColorManagedViewSettings *m_viewSettings; - const ColorManagedDisplaySettings *m_displaySettings; - - const char *m_viewName; -public: - OutputSingleLayerOperation(const RenderData *rd, const bNodeTree *tree, DataType datatype, ImageFormatData *format, const char *path, - const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings, const char *viewName); - - void executeRegion(rcti *rect, unsigned int tileNumber); - bool isOutputOperation(bool /*rendering*/) const { return true; } - void initExecution(); - void deinitExecution(); - CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } - - bool isFileOutputOperation() const { return true; } + protected: + const RenderData *m_rd; + const bNodeTree *m_tree; + + ImageFormatData *m_format; + char m_path[FILE_MAX]; + + float *m_outputBuffer; + DataType m_datatype; + SocketReader *m_imageInput; + + const ColorManagedViewSettings *m_viewSettings; + const ColorManagedDisplaySettings *m_displaySettings; + + const char *m_viewName; + + public: + OutputSingleLayerOperation(const RenderData *rd, + const bNodeTree *tree, + DataType datatype, + ImageFormatData *format, + const char *path, + const ColorManagedViewSettings *viewSettings, + const ColorManagedDisplaySettings *displaySettings, + const char *viewName); + + void executeRegion(rcti *rect, unsigned int tileNumber); + bool isOutputOperation(bool /*rendering*/) const + { + return true; + } + void initExecution(); + void deinitExecution(); + CompositorPriority getRenderPriority() const + { + return COM_PRIORITY_LOW; + } + + bool isFileOutputOperation() const + { + return true; + } }; /* extra info for OpenEXR layers */ struct OutputOpenExrLayer { - OutputOpenExrLayer(const char *name, DataType datatype, bool use_layer); + OutputOpenExrLayer(const char *name, DataType datatype, bool use_layer); - char name[EXR_TOT_MAXNAME - 2]; - DataType datatype; - bool use_layer; + char name[EXR_TOT_MAXNAME - 2]; + DataType datatype; + bool use_layer; - /* internals */ - float *outputBuffer; - SocketReader *imageInput; + /* internals */ + float *outputBuffer; + SocketReader *imageInput; }; /* Writes inputs into OpenEXR multilayer channels. */ class OutputOpenExrMultiLayerOperation : public NodeOperation { -protected: - typedef std::vector LayerList; - - const RenderData *m_rd; - const bNodeTree *m_tree; - - char m_path[FILE_MAX]; - char m_exr_codec; - bool m_exr_half_float; - LayerList m_layers; - const char *m_viewName; - -public: - OutputOpenExrMultiLayerOperation(const RenderData *rd, const bNodeTree *tree, const char *path, - char exr_codec, bool exr_half_float, const char *viewName); - - void add_layer(const char *name, DataType datatype, bool use_layer); - - void executeRegion(rcti *rect, unsigned int tileNumber); - bool isOutputOperation(bool /*rendering*/) const { return true; } - void initExecution(); - void deinitExecution(); - CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } - - bool isFileOutputOperation() const { return true; } + protected: + typedef std::vector LayerList; + + const RenderData *m_rd; + const bNodeTree *m_tree; + + char m_path[FILE_MAX]; + char m_exr_codec; + bool m_exr_half_float; + LayerList m_layers; + const char *m_viewName; + + public: + OutputOpenExrMultiLayerOperation(const RenderData *rd, + const bNodeTree *tree, + const char *path, + char exr_codec, + bool exr_half_float, + const char *viewName); + + void add_layer(const char *name, DataType datatype, bool use_layer); + + void executeRegion(rcti *rect, unsigned int tileNumber); + bool isOutputOperation(bool /*rendering*/) const + { + return true; + } + void initExecution(); + void deinitExecution(); + CompositorPriority getRenderPriority() const + { + return COM_PRIORITY_LOW; + } + + bool isFileOutputOperation() const + { + return true; + } }; -void add_exr_channels(void *exrhandle, const char *layerName, const DataType datatype, const char *viewName, - const size_t width, bool use_half_float, float *buf); -void free_exr_channels(void *exrhandle, const RenderData *rd, const char *layerName, const DataType datatype); +void add_exr_channels(void *exrhandle, + const char *layerName, + const DataType datatype, + const char *viewName, + const size_t width, + bool use_half_float, + float *buf); +void free_exr_channels(void *exrhandle, + const RenderData *rd, + const char *layerName, + const DataType datatype); int get_datatype_size(DataType datatype); #endif -- cgit v1.2.3