Instance Method


An optional call to warm up a CIContext so that subsequent calls to render with the same arguments run more efficiently.


func prepareRender(_ image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws



CIImage to prepare to render.


A CGRect defining the region to render.


The CIRenderDestination to which you are preparing to render.


The CGPoint at which you are preparing to render.


Pointer to an error should preparation to render fail.

Return Value

Returns true if preparation succeeded.


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.

See Also

Customizing Render Destination

func startTask(toClear: CIRenderDestination) -> CIRenderTask

Fills the entire destination with black or clear depending on its alphaMode.

func startTask(toRender: CIImage, to: CIRenderDestination) -> CIRenderTask

Renders an image to a destination so that point (0, 0) of the image maps to point (0, 0) of the destination.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software