---
title: "startTask(toClear:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/cicontext/starttask(toclear:)"
---

# startTask(toClear:)

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

## Declaration

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

## Parameters

- `destination`: The doc://com.apple.coreimage/documentation/CoreImage/CIRenderDestination to clear.

## Return Value

Return Value The asynchronous CIRenderTask for clearing the destination.

## Discussion

Discussion 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

- [prepareRender(_:from:to:at:)](coreimage/cicontext/preparerender(_:from:to:at:).md)
- [startTask(toRender:from:to:at:)](coreimage/cicontext/starttask(torender:from:to:at:).md)
- [startTask(toRender:to:)](coreimage/cicontext/starttask(torender:to:).md)
