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

*** ** * ** ***


```
public final class GPUSurfaceCapabilities
```

<br />

*** ** * ** ***

Describes the capabilities of a surface for a given adapter.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#GPUSurfaceCapabilities(kotlin.Int,kotlin.IntArray,kotlin.IntArray,kotlin.IntArray)( int usages, @https://developer.android.com/reference/androidx/annotation/NonNull int[] formats, @https://developer.android.com/reference/androidx/annotation/NonNull int[] presentModes, @https://developer.android.com/reference/androidx/annotation/NonNull int[] alphaModes )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull int[]` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#getAlphaModes()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull int[]` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#getFormats()()` An array of supported texture formats for the surface. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull int[]` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#getPresentModes()()` |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#getUsages()()` The supported texture usages for the surface. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#setAlphaModes(kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull int[] value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#setFormats(kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull int[] value)` An array of supported texture formats for the surface. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#setPresentModes(kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull int[] value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceCapabilities#setUsages(kotlin.Int)(int value)` 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)

```
public GPUSurfaceCapabilities(
    int usages,
    @NonNull int[] formats,
    @NonNull int[] presentModes,
    @NonNull int[] alphaModes
)
```

## Public methods

### getAlphaModes

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

```
public final @NonNull int[] getAlphaModes()
```

### getFormats

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

```
public final @NonNull int[] getFormats()
```

An array of supported texture formats for the surface.

### getPresentModes

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

```
public final @NonNull int[] getPresentModes()
```

### getUsages

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

```
public final int getUsages()
```

The supported texture usages for the surface.

### setAlphaModes

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

```
public final void setAlphaModes(@NonNull int[] value)
```

### setFormats

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

```
public final void setFormats(@NonNull int[] value)
```

An array of supported texture formats for the surface.

### setPresentModes

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

```
public final void setPresentModes(@NonNull int[] value)
```

### setUsages

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

```
public final void setUsages(int value)
```

The supported texture usages for the surface.