From e94326b67b392aa4a42c972cdbee76121a9b8841 Mon Sep 17 00:00:00 2001 From: Manuel Castilla Date: Wed, 4 Aug 2021 13:32:07 +0200 Subject: Compositor: Use a single elem as area of interest where possible --- .../operations/COM_PlaneCornerPinOperation.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc') diff --git a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc index fcbf42c8713..92b273327be 100644 --- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc +++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc @@ -220,6 +220,14 @@ void PlaneCornerPinMaskOperation::determineResolution(unsigned int resolution[2] resolution[1] = preferredResolution[1]; } +void PlaneCornerPinMaskOperation::get_area_of_interest(const int input_idx, + const rcti &output_area, + rcti &r_input_area) +{ + /* All corner inputs are used as constants. */ + r_input_area = COM_SINGLE_ELEM_AREA; +} + /* ******** PlaneCornerPinWarpImageOperation ******** */ PlaneCornerPinWarpImageOperation::PlaneCornerPinWarpImageOperation() : m_corners_ready(false) @@ -305,4 +313,17 @@ bool PlaneCornerPinWarpImageOperation::determineDependingAreaOfInterest( #endif } +void PlaneCornerPinWarpImageOperation::get_area_of_interest(const int input_idx, + const rcti &output_area, + rcti &r_input_area) +{ + if (input_idx == 0) { + PlaneDistortWarpImageOperation::get_area_of_interest(input_idx, output_area, r_input_area); + } + else { + /* Corner inputs are used as constants. */ + r_input_area = COM_SINGLE_ELEM_AREA; + } +} + } // namespace blender::compositor -- cgit v1.2.3