roiTileArray(forInput:arguments:outputRect:)
Override this class method to implement your processor’s tiled ROI callback.
Declaration
class func roiTileArray(forInput inputIndex: Int32, arguments: [String : Any]?, outputRect: CGRect) -> [CIVector]Parameters
- inputIndex:
The index that tells you which processor input for which to return the array of ROI rectangles
- arguments:
The arguments dictionary that was passed to Apply(withextent:inputs:arguments:).
- outputRect:
The output
CGRectthat processor will be asked to output.
Return Value
An array of CIVector that specify tile regions of the inputIndex’th input that is required for the above outputRect Each region tile in the array is a created by calling /CIVector/vectorWithCGRect:/ The tiles may overlap but should fully cover the area of ‘input’ that is needed. If a processor has multiple inputs, then each input should return the same number of region tiles.
Discussion
This will be called one or more times per render to determine what tiles of the input images are needed to render a given outputRect of the output.
If the processor implements this method, then when rendered;
as CoreImage prepares for a render, this method will be called for each input to return an ROI tile array.
as CoreImage performs the render, the method process(with:arguments:output:) will be called once for each tile.