prepareRender(_:from:to:at:)
An optional call to warm up a Cicontext so that subsequent calls to render with the same arguments run more efficiently.
Declaration
func prepareRender(_ image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throwsParameters
- image:
Ciimage to prepare to render.
- fromRect:
A Cgrect defining the region to render.
- destination:
The Cirenderdestination to which you are preparing to render.
- atPoint:
The Cgpoint at which you are preparing to render.
Discussion
By making this call, the Core Image framework ensures that any needed kernels are compiled, and any intermediate buffers are allocated and marked volatile up front.