# SwappyTracer

`#include <swappy_common.h>`

Collection of callbacks to be called each frame to trace execution.

## Summary

Injection of these is optional.

| ### Public attributes ||
|---|---|
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1a5b90ffd050550ba2bddf87d3beb1de31` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1ga43b3466def86b5364bc588e3706ac1c6` Callback called after calling the function to queue the frame to the composer. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1aff96c754aeeb02dd0056b8960fb28bf6` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1gaf3c6e6c7e094da4ed0cd23799887d108` Callback called after wait to queue the frame to the composer is done. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1a7bca44be2bd337dc03df3bd347a866d7` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1ga21947d41c898ef2159b8305f6135000a` Callback called before calling the function to queue the frame to the composer. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1ada85e41048b0ae92a862e57e3116b74b` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1ga8da48682343efb9c28c6f7e8c0a807e4` Callback called before waiting to queue the frame to the composer. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1a8dd15d901ee45cf62ccb2850d3da394b` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1ga4da61fae71b4f0cd793f3258f630d725` Callback called at the start of a frame. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1ad67a82b14f790d233ef55b231d570548` | `https://developer.android.com/games/sdk/reference/frame-pacing/group/swappy-common#group__swappy__common_1ga8c875fa65196c9dd2cb5436a55134cfe` Callback called when the swap interval was changed. |
| `https://developer.android.com/games/sdk/reference/frame-pacing/struct/swappy-tracer#struct_swappy_tracer_1acb8c410a25c23172b054a3ea3c62d48a` | `void *` Pointer to some arbitrary data that will be passed as the first argument of callbacks. |

## Public attributes

### postSwapBuffers

```text
SwappyPostSwapBuffersCallback SwappyTracer::postSwapBuffers
```
Callback called after calling the function to queue the frame to the composer.

### postWait

```text
SwappyPostWaitCallback SwappyTracer::postWait
```
Callback called after wait to queue the frame to the composer is done.

### preSwapBuffers

```text
SwappyPreSwapBuffersCallback SwappyTracer::preSwapBuffers
```
Callback called before calling the function to queue the frame to the composer.

### preWait

```text
SwappyPreWaitCallback SwappyTracer::preWait
```
Callback called before waiting to queue the frame to the composer.

### startFrame

```text
SwappyStartFrameCallback SwappyTracer::startFrame
```
Callback called at the start of a frame.

### swapIntervalChanged

```text
SwappySwapIntervalChangedCallback SwappyTracer::swapIntervalChanged
```
Callback called when the swap interval was changed.

### userData

```scdoc
void * SwappyTracer::userData
```
Pointer to some arbitrary data that will be passed as the first argument of callbacks.