<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVVideoCompositing/anticipateRendering(using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVVideoCompositing(im)anticipateRenderingUsingHint:"
  },
  "title" : "anticipateRendering(using:)"
}
-->

# anticipateRendering(using:)

Informs a custom video compositor about upcoming rendering requests.

```
optional func anticipateRendering(using renderHint: AVVideoCompositionRenderHint)
```

## Parameters

`renderHint`

Information about the upcoming composition requests.

## Discussion

In this method, the compositor can load composition resources, such as overlay images, that will be needed in the anticipated rendering time range.

Unlike the [`startRequest(_:)`](/documentation/AVFoundation/AVVideoCompositing/startRequest(_:)) method, which is invoked only when the frame compositing is necessary, this method is typically called every frame duration. It allows the custom compositor to load and unload a composition resource such as overlay images at an appropriate time.

In forward playback, the render hint’s [`startCompositionTime`](/documentation/AVFoundation/AVVideoCompositionRenderHint/startCompositionTime) is less than its [`endCompositionTime`](/documentation/AVFoundation/AVVideoCompositionRenderHint/endCompositionTime). In reverse playback, its [`endCompositionTime`](/documentation/AVFoundation/AVVideoCompositionRenderHint/endCompositionTime) is less than its [`startCompositionTime`](/documentation/AVFoundation/AVVideoCompositionRenderHint/startCompositionTime). For seeking, the two values are equivalent, which means the upcoming composition request time range is unknown.

This method is guaranteed to be called before [`startRequest(_:)`](/documentation/AVFoundation/AVVideoCompositing/startRequest(_:)) for a given composition time.

This method is synchronous. Make sure that your implementation returns quickly to ensure that playback doesn’t stall and cause frame drops.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)