New ("fullframe") CPU compositor backend is being used now, and all the code
related to "tiled" CPU compositor is just never used anymore. The new backend
is faster, uses less memory, better matches GPU compositor, etc.
TL;DR: 20 thousand lines of code gone.
This commit:
- Removes various bits and pieces related to "tiled" compositor (execution
groups, one-pixel-at-a-time node processing, read/write buffer operations
related to node execution groups).
- "GPU" (OpenCL) execution device, that was only used by several nodes of
the tiled compositor.
- With that, remove CLEW external library too, since nothing within Blender
uses OpenCL directly anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/118819
62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
/* SPDX-FileCopyrightText: 2021 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "COM_BlurBaseOperation.h"
|
|
|
|
namespace blender::compositor {
|
|
|
|
class GaussianAlphaBlurBaseOperation : public BlurBaseOperation {
|
|
protected:
|
|
float *gausstab_;
|
|
float *distbuf_inv_;
|
|
int falloff_; /* Falloff for #distbuf_inv. */
|
|
bool do_subtract_;
|
|
int filtersize_;
|
|
float rad_;
|
|
eDimension dimension_;
|
|
|
|
public:
|
|
GaussianAlphaBlurBaseOperation(eDimension dim);
|
|
|
|
virtual void init_data() override;
|
|
virtual void init_execution() override;
|
|
virtual void deinit_execution() override;
|
|
|
|
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) final;
|
|
void update_memory_buffer_partial(MemoryBuffer *output,
|
|
const rcti &area,
|
|
Span<MemoryBuffer *> inputs) final;
|
|
|
|
/**
|
|
* Set subtract for Dilate/Erode functionality
|
|
*/
|
|
void set_subtract(bool subtract)
|
|
{
|
|
do_subtract_ = subtract;
|
|
}
|
|
void set_falloff(int falloff)
|
|
{
|
|
falloff_ = falloff;
|
|
}
|
|
|
|
BLI_INLINE float finv_test(const float f, const bool test)
|
|
{
|
|
return (LIKELY(test == false)) ? f : 1.0f - f;
|
|
}
|
|
};
|
|
|
|
class GaussianAlphaXBlurOperation : public GaussianAlphaBlurBaseOperation {
|
|
public:
|
|
GaussianAlphaXBlurOperation() : GaussianAlphaBlurBaseOperation(eDimension::X) {}
|
|
};
|
|
|
|
class GaussianAlphaYBlurOperation : public GaussianAlphaBlurBaseOperation {
|
|
public:
|
|
GaussianAlphaYBlurOperation() : GaussianAlphaBlurBaseOperation(eDimension::Y) {}
|
|
};
|
|
|
|
} // namespace blender::compositor
|