---
title: "prerollForRendering(using:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avvideocompositing/prerollforrendering(using:)"
---

# prerollForRendering(using:)

Tells a custom video compositor to perform any work in the prerolling phase.

## Declaration

```swift
optional func prerollForRendering(using renderHint: AVVideoCompositionRenderHint)
```

## Parameters

- `renderHint`: Information about the upcoming composition requests.

## Discussion

Discussion The AVFoundation framework may perform prerolling to load media data to prime the render pipelines for smoother playback. This method is called in the prerolling phase so that the compositor can load composition resources, such as overlay images, that will be needed as soon as the playback starts. Not all rendering scenarios use prerolling. For example, this method won’t be called during seeking. If this method is called, it is guaranteed to be invoked before the first startRequest(_:) call. This method is synchronous. The prerolling won’t finish until the method returns.

## See Also

### Preparing to render frames

- [anticipateRendering(using:)](avfoundation/avvideocompositing/anticipaterendering(using:).md)
- [AVVideoCompositionRenderHint](avfoundation/avvideocompositionrenderhint.md)
