# SurfaceGetCurrentTextureStatus

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

*** ** * ** ***


```
class SurfaceGetCurrentTextureStatus
```

<br />

*** ** * ** ***

Status codes for retrieving the current texture from a surface.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#Error() = 6` A deterministic error occurred, such as the surface not being configured. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#Lost() = 5` The surface has been lost and must be recreated. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#Outdated() = 4` The surface configuration is outdated and must be reconfigured. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#SuccessOptimal() = 1` The texture was acquired successfully and is optimal for presentation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#SuccessSuboptimal() = 2` The texture was acquired successfully but is suboptimal for presentation; reconfiguration may be needed. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/SurfaceGetCurrentTextureStatus#Timeout() = 3` The operation timed out while acquiring the texture. |

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

## Constants

### Error

```
const val Error = 6: Int
```

A deterministic error occurred, such as the surface not being configured.

### Lost

```
const val Lost = 5: Int
```

The surface has been lost and must be recreated.

### Outdated

```
const val Outdated = 4: Int
```

The surface configuration is outdated and must be reconfigured.

### SuccessOptimal

```
const val SuccessOptimal = 1: Int
```

The texture was acquired successfully and is optimal for presentation.

### SuccessSuboptimal

```
const val SuccessSuboptimal = 2: Int
```

The texture was acquired successfully but is suboptimal for presentation; reconfiguration may be needed.

### Timeout

```
const val Timeout = 3: Int
```

The operation timed out while acquiring the texture.

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