diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-04 14:32:07 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-04 14:32:07 +0300 |
commit | e94326b67b392aa4a42c972cdbee76121a9b8841 (patch) | |
tree | 623e53c2f1616003e5fb0eece617042dbca2585c /source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc | |
parent | c84a294c66179ba412040d194e04dbc3d7525b64 (diff) |
Compositor: Use a single elem as area of interest where possible
Diffstat (limited to 'source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc | 21 |
1 files changed, 21 insertions, 0 deletions
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 |