<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIContext/prepareRender(_:from:to:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIContext(im)prepareRender:fromRect:toDestination:atPoint:error:"
  },
  "title" : "prepareRender(_:from:to:at:)"
}
-->

# prepareRender(_:from:to:at:)

An optional call to warm up a [`CIContext`](/documentation/CoreImage/CIContext) so that subsequent calls to render with the same arguments run more efficiently.

```
func prepareRender(_ image: CIImage, from fromRect: CGRect, to destination: CIRenderDestination, at atPoint: CGPoint) throws
```

## Parameters

`image`

[`CIImage`](/documentation/CoreImage/CIImage) to prepare to render.

`fromRect`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGRect> defining the region to render.

`destination`

The [`CIRenderDestination`](/documentation/CoreImage/CIRenderDestination) to which you are preparing to render.

`atPoint`

The <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint> at which you are preparing to render.

## 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.

---

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)