# GPUSurfaceCapabilities

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

*** ** * ** ***


```
class GPUSurfaceCapabilities
```

<br />

*** ** * ** ***

Describes the capabilities of a surface for a given adapter.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities#GPUSurfaceCapabilities(kotlin.Int,kotlin.IntArray,kotlin.IntArray,kotlin.IntArray)( usages: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, formats: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html, presentModes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html, alphaModes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities#alphaModes()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities#formats()` An array of supported texture formats for the surface. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities#presentModes()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUSurfaceCapabilities#usages()` The supported texture usages for the surface. |

## Public constructors

### GPUSurfaceCapabilities

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

```
GPUSurfaceCapabilities(
    usages: Int,
    formats: IntArray = intArrayOf(),
    presentModes: IntArray = intArrayOf(),
    alphaModes: IntArray = intArrayOf()
)
```

## Public properties

### alphaModes

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

```
var alphaModes: IntArray
```

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`

<br />

### formats

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

```
var formats: IntArray
```

An array of supported texture formats for the surface.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`
- `9`
- `10`
- `11`
- `12`
- `13`
- `14`
- `15`
- `16`
- `17`
- `18`
- `19`
- `20`
- `21`
- `22`
- `23`
- `24`
- `25`
- `26`
- `27`
- `28`
- `29`
- `30`
- `31`
- `32`
- `33`
- `34`
- `35`
- `36`
- `37`
- `38`
- `39`
- `40`
- `41`
- `42`
- `43`
- `44`
- `45`
- `46`
- `47`
- `48`
- `49`
- `50`
- `51`
- `52`
- `53`
- `54`
- `55`
- `56`
- `57`
- `58`
- `59`
- `60`
- `61`
- `62`
- `63`
- `64`
- `65`
- `66`
- `67`
- `68`
- `69`
- `70`
- `71`
- `72`
- `73`
- `74`
- `75`
- `76`
- `77`
- `78`
- `79`
- `80`
- `81`
- `82`
- `83`
- `84`
- `85`
- `86`
- `87`
- `88`
- `89`
- `90`
- `91`
- `92`
- `93`
- `94`
- `95`
- `96`
- `97`
- `98`
- `99`
- `100`
- `101`

<br />

### presentModes

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

```
var presentModes: IntArray
```

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`

<br />

### usages

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

```
var usages: Int
```

The supported texture usages for the surface.

Value is either `0` or a combination of the following:

- `0`
- `1`
- `2`
- `4`
- `8`
- `16`
- `32`

<br />