---
title: endSubmission()
framework: compositorservices
role: symbol
role_heading: Instance Method
path: compositorservices/layerrenderer/frame/endsubmission()
---

# endSubmission()

Notifies Compositor Services that you finished generating the GPU commands to render the specified frame.

## Declaration

```swift
func endSubmission()
```

## Mentioned in

Drawing fully immersive content using Metal

## Discussion

Discussion This function helps you optimize your app’s rendering efficiency. Call startSubmission() function before you start any of the GPU work that depends on the device pose. Call this function after you build your Metal command buffers and are ready to commit the frame to the GPU. Compositor Services uses the time difference to improve its predictions for when to start the frame submission process. Those predictions help you schedule the encoding process at a more optimal time for the system.

## See Also

### Reporting frame submission times

- [startSubmission()](compositorservices/layerrenderer/frame/startsubmission().md)
