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-09-28 20:32:49 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-09-28 23:00:16 +0300
commit76377f0176b9561a7fc8f46b4ed704c631ddd90d (patch)
tree96775442f403dfdb0dc4d91f835495c72c1ca9c1 /source/blender/compositor/operations/COM_GlareThresholdOperation.cc
parent2ecd963d87e4f5215d1d86e7f1c22ab7833697f3 (diff)
Compositor: Replace resolution concept by canvas
This is a code refactor in preparation of supporting canvas compositing. See {D12466}. No functional changes, all canvases are at (0,0) position matching tiled implementation. Differential Revision: https://developer.blender.org/D12465
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
index 1d3402f5b7b..f8da0b9a102 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
@@ -30,12 +30,13 @@ GlareThresholdOperation::GlareThresholdOperation()
this->m_inputProgram = nullptr;
}
-void GlareThresholdOperation::determineResolution(unsigned int resolution[2],
- unsigned int preferredResolution[2])
+void GlareThresholdOperation::determine_canvas(const rcti &preferred_area, rcti &r_area)
{
- NodeOperation::determineResolution(resolution, preferredResolution);
- resolution[0] = resolution[0] / (1 << this->m_settings->quality);
- resolution[1] = resolution[1] / (1 << this->m_settings->quality);
+ 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);
+ r_area.xmax = r_area.xmin + width;
+ r_area.ymax = r_area.ymin + height;
}
void GlareThresholdOperation::initExecution()