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.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
index becf6c586ac..1bf7cf5ae07 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cc
@@ -30,22 +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);
- switch (execution_model_) {
- case eExecutionModel::Tiled:
- resolution[0] = resolution[0] / (1 << this->m_settings->quality);
- resolution[1] = resolution[1] / (1 << this->m_settings->quality);
- break;
- case eExecutionModel::FullFrame:
- /* TODO(manzanilla): Currently scaling up always crop so it's not possible to use a lower
- * resolution for lower quality to later scale up. Once scaling supports adapting canvas, use
- * same implementation as #eExecutionModel::Tiled. This makes glare node to be always high
- * quality. */
- break;
- }
+ 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()