# GPUSurfaceTexture

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

*** ** * ** ***


```
public final class GPUSurfaceTexture
```

<br />

*** ** * ** ***

Contains a texture to render to for a surface, along with status information.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceTexture#GPUSurfaceTexture(androidx.webgpu.GPUTexture,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTexture texture, int status)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceTexture#getStatus()()` The status of the texture acquisition. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTexture` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceTexture#getTexture()()` The texture for the current frame. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceTexture#setStatus(kotlin.Int)(int value)` The status of the texture acquisition. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUSurfaceTexture#setTexture(androidx.webgpu.GPUTexture)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTexture value)` The texture for the current frame. |

## Public constructors

### GPUSurfaceTexture

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

```
public GPUSurfaceTexture(@NonNull GPUTexture texture, int status)
```

## Public methods

### getStatus

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

```
public final int getStatus()
```

The status of the texture acquisition.

### getTexture

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

```
public final @NonNull GPUTexture getTexture()
```

The texture for the current frame.

### setStatus

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

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

The status of the texture acquisition.

### setTexture

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

```
public final void setTexture(@NonNull GPUTexture value)
```

The texture for the current frame.