Instance Method


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


func startTask(toClear destination: CIRenderDestination) throws -> CIRenderTask



The CIRenderDestination to clear.


Pointer to an error object should the task fail.

Return Value

The asynchronous CIRenderTask for clearing the destination.


If the destination's alphaMode is CIRenderDestinationAlphaMode.none, this command fills the entire destination with black (0, 0, 0, 1).

If the destination's alphaMode is CIRenderDestinationAlphaMode.premultiplied or CIRenderDestinationAlphaMode.unpremultiplied, this command fills the entire destination with clear (0, 0, 0, 0).

See Also

Customizing Render Destination

func prepareRender(CIImage, from: CGRect, to: CIRenderDestination, at: CGPoint)

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

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