Instance Method

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) throws

Parameters

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.

error

Pointer to an error should preparation to render fail.

Return Value

Returns true if preparation succeeded.

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.

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