---
title: encodePresent()
framework: compositorservices
role: symbol
role_heading: Instance Method
path: compositorservices/layerrenderer/drawable/encodepresent()
---

# encodePresent()

Encodes a notification event to the specified command buffer to present the drawable’s content onscreen.

## Declaration

```swift
func encodePresent()
```

## Discussion

Discussion note: Commit the command buffer to the layer queue before calling present. Call this function as the last step before committing the specified command buffer. Specifically, call it after you finish encoding all the work required to render the frame, and immediately before you call the command buffer’s commit() method. The function adds a presentation event to the buffer that causes the compositor to display your frame.
