# 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)

*** ** * ** ***


```
class PresentMode
```

<br />

*** ** * ** ***

Defines the behavior of frame presentation for a surface.

## Summary

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

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/PresentMode#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### Fifo

```
const val Fifo = 1: Int
```

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

### FifoRelaxed

```
const val FifoRelaxed = 2: Int
```

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

### Immediate

```
const val Immediate = 3: Int
```

Presents frames immediately, which may result in tearing.

### Mailbox

```
const val Mailbox = 4: Int
```

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

### Undefined

```
const val Undefined = 0: Int
```

The present mode is not specified; uses a default.

## Public companion functions

### toString

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

```
fun toString(value: Int): String
```