Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Castilla <manzanillawork@gmail.com>2021-06-23 18:21:17 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-06-23 18:46:53 +0300
commit35db01325f41da34e5a71d2b28cc717cddbdb996 (patch)
tree923bfa9c71e1eda1f1fc25c01a7ebbd0382f0d49 /source/blender/compositor/operations/COM_ImageOperation.h
parent8f4d99159404621a9063f4bd155a519baf51f313 (diff)
Compositor: Full frame Image node
Adds full frame implementation to Image node operations. Mostly refactored into buffer utility methods for reuse in other operations. No functional changes. 1.8x faster than tiled fallback. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11559
Diffstat (limited to 'source/blender/compositor/operations/COM_ImageOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h
index 58373663db5..f8b4239c9f8 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.h
+++ b/source/blender/compositor/operations/COM_ImageOperation.h
@@ -21,7 +21,7 @@
#include "BKE_image.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
-#include "COM_NodeOperation.h"
+#include "COM_MultiThreadedOperation.h"
#include "MEM_guardedalloc.h"
#include "RE_pipeline.h"
@@ -32,14 +32,17 @@ namespace blender::compositor {
/**
* \brief Base class for all image operations
*/
-class BaseImageOperation : public NodeOperation {
+class BaseImageOperation : public MultiThreadedOperation {
protected:
ImBuf *m_buffer;
Image *m_image;
ImageUser *m_imageUser;
+ /* TODO: Remove raw buffers when removing Tiled implementation. */
float *m_imageFloatBuffer;
unsigned int *m_imageByteBuffer;
float *m_depthBuffer;
+
+ MemoryBuffer *depth_buffer_;
int m_imageheight;
int m_imagewidth;
int m_framenumber;
@@ -87,6 +90,10 @@ class ImageOperation : public BaseImageOperation {
*/
ImageOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
+
+ void update_memory_buffer_partial(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs) override;
};
class ImageAlphaOperation : public BaseImageOperation {
public:
@@ -95,6 +102,10 @@ class ImageAlphaOperation : public BaseImageOperation {
*/
ImageAlphaOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
+
+ void update_memory_buffer_partial(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs) override;
};
class ImageDepthOperation : public BaseImageOperation {
public:
@@ -103,6 +114,10 @@ class ImageDepthOperation : public BaseImageOperation {
*/
ImageDepthOperation();
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
+
+ void update_memory_buffer_partial(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs) override;
};
} // namespace blender::compositor