# PresentMode

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/PresentMode.kt+class:androidx.webgpu.PresentMode) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public final class PresentMode
```

<br />

*** ** * ** ***

Defines the behavior of frame presentation for a surface.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#Fifo() = 1` V-sync enabled, presents frames in a first-in, first-out queue. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#FifoRelaxed() = 2` A relaxed version of FIFO that may allow tearing to reduce latency. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#Immediate() = 3` Presents frames immediately, which may result in tearing. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#Mailbox() = 4` V-sync enabled, presents the most recently completed frame, discarding older ones. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#Undefined() = 0` The present mode is not specified; uses a default. |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/PresentMode#toString(kotlin.Int)(int value)` |

## Constants

### Fifo

```
public static final int Fifo = 1
```

V-sync enabled, presents frames in a first-in, first-out queue.

### FifoRelaxed

```
public static final int FifoRelaxed = 2
```

A relaxed version of FIFO that may allow tearing to reduce latency.

### Immediate

```
public static final int Immediate = 3
```

Presents frames immediately, which may result in tearing.

### Mailbox

```
public static final int Mailbox = 4
```

V-sync enabled, presents the most recently completed frame, discarding older ones.

### Undefined

```
public static final int Undefined = 0
```

The present mode is not specified; uses a default.

## Public methods

### toString

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public static final @NonNull String toString(int value)
```