<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVVideoCompositionRenderContext",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVVideoCompositionRenderContext"
  },
  "title" : "AVVideoCompositionRenderContext"
}
-->

# AVVideoCompositionRenderContext

An object that defines the context in which custom compositors render pixel buffers.

```
class AVVideoCompositionRenderContext
```

## Overview

A render context provides size and scaling information and offers a service for efficiently providing pixel buffers from a managed pool of buffers.

## Topics

### Creating the pixel buffer

[`newPixelBuffer()`](/documentation/AVFoundation/AVVideoCompositionRenderContext/newPixelBuffer())

Returns a pixel buffer to use for rendering.

[`makeMutablePixelBuffer()`](/documentation/AVFoundation/AVVideoCompositionRenderContext/makeMutablePixelBuffer())

Vends a CVMutablePixelBuffer to use for rendering.
The buffer will have its kCVImageBufferCleanApertureKey and kCVImageBufferPixelAspectRatioKey attachments set to match the current composition processor properties.

### Getting the render settings

[`videoComposition`](/documentation/AVFoundation/AVVideoCompositionRenderContext/videoComposition)

The video composition being rendered.

[`highQualityRendering`](/documentation/AVFoundation/AVVideoCompositionRenderContext/highQualityRendering)

The rendering quality to use.

[`renderScale`](/documentation/AVFoundation/AVVideoCompositionRenderContext/renderScale)

A scaling ratio that is applied when rendering frames.

[`renderTransform`](/documentation/AVFoundation/AVVideoCompositionRenderContext/renderTransform)

A transform to apply to the source image.

[`size`](/documentation/AVFoundation/AVVideoCompositionRenderContext/size)

The width and height for the rendering frames.

### Getting pixel and edge width information

[`edgeWidths`](/documentation/AVFoundation/AVVideoCompositionRenderContext/edgeWidths)

The width of the edge processing region on the left, top, right, and bottom edges, in pixels.

[`AVEdgeWidths`](/documentation/AVFoundation/AVEdgeWidths)

A structure that defines edge processing region widths.

[`pixelAspectRatio`](/documentation/AVFoundation/AVVideoCompositionRenderContext/pixelAspectRatio)

The pixel aspect ratio for rendered frames.

[`AVPixelAspectRatio`](/documentation/AVFoundation/AVPixelAspectRatio)

A structure that defines a pixel aspect ratio for a rendering context.



---

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)