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:
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cc33
1 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
index 1bf7cf5ae07..0538b4e48a0 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
@@ -17,7 +17,6 @@
*/
#include "COM_GlareThresholdOperation.h"
-#include "BLI_math.h"
#include "IMB_colormanagement.h"
@@ -25,33 +24,33 @@ namespace blender::compositor {
GlareThresholdOperation::GlareThresholdOperation()
{
- this->addInputSocket(DataType::Color, ResizeMode::FitAny);
- this->addOutputSocket(DataType::Color);
- this->m_inputProgram = nullptr;
+ this->add_input_socket(DataType::Color, ResizeMode::FitAny);
+ this->add_output_socket(DataType::Color);
+ input_program_ = nullptr;
}
void GlareThresholdOperation::determine_canvas(const rcti &preferred_area, rcti &r_area)
{
NodeOperation::determine_canvas(preferred_area, r_area);
- const int width = BLI_rcti_size_x(&r_area) / (1 << this->m_settings->quality);
- const int height = BLI_rcti_size_y(&r_area) / (1 << this->m_settings->quality);
+ const int width = BLI_rcti_size_x(&r_area) / (1 << settings_->quality);
+ const int height = BLI_rcti_size_y(&r_area) / (1 << settings_->quality);
r_area.xmax = r_area.xmin + width;
r_area.ymax = r_area.ymin + height;
}
-void GlareThresholdOperation::initExecution()
+void GlareThresholdOperation::init_execution()
{
- this->m_inputProgram = this->getInputSocketReader(0);
+ input_program_ = this->get_input_socket_reader(0);
}
-void GlareThresholdOperation::executePixelSampled(float output[4],
- float x,
- float y,
- PixelSampler sampler)
+void GlareThresholdOperation::execute_pixel_sampled(float output[4],
+ float x,
+ float y,
+ PixelSampler sampler)
{
- const float threshold = this->m_settings->threshold;
+ const float threshold = settings_->threshold;
- this->m_inputProgram->readSampled(output, x, y, sampler);
+ input_program_->read_sampled(output, x, y, sampler);
if (IMB_colormanagement_get_luminance(output) >= threshold) {
output[0] -= threshold;
output[1] -= threshold;
@@ -66,16 +65,16 @@ void GlareThresholdOperation::executePixelSampled(float output[4],
}
}
-void GlareThresholdOperation::deinitExecution()
+void GlareThresholdOperation::deinit_execution()
{
- this->m_inputProgram = nullptr;
+ input_program_ = nullptr;
}
void GlareThresholdOperation::update_memory_buffer_partial(MemoryBuffer *output,
const rcti &area,
Span<MemoryBuffer *> inputs)
{
- const float threshold = this->m_settings->threshold;
+ const float threshold = settings_->threshold;
for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) {
const float *color = it.in(0);
if (IMB_colormanagement_get_luminance(color) >= threshold) {