# GPUHardwareBufferExternalTexture

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

*** ** * ** ***


```
@ExperimentalWebGpuApi
public final class GPUHardwareBufferExternalTexture extends GPUHardwareBufferWrapper
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.webgpu.GPUHardwareBufferWrapper](https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper) ||
|   | ↳ | [androidx.webgpu.GPUHardwareBufferExternalTexture](https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferExternalTexture) |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferExternalTexture#GPUHardwareBufferExternalTexture(kotlin.Long,androidx.webgpu.GPUExternalTexture)( long handle, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUExternalTexture externalTexture )` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferExternalTexture#close()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUExternalTexture` | `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferExternalTexture#getExternalTexture()()` |

### Inherited methods

From [androidx.webgpu.GPUHardwareBufferWrapper](https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper) `final void` `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper#beginAccess(kotlin.Array)(GPUSyncFence[] fences)`

Begins access to the hardware buffer, passing any wait fences to the native layer.
`final https://developer.android.com/reference/androidx/webgpu/GPUSyncFence` `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper#endAccess()()`

Ends access to the hardware buffer, returning a signal fence from the native layer.
`final external void` `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper#nativeBeginAccess(kotlin.Long,kotlin.IntArray)(long handle, int[] fences)` `final external void` `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper#nativeDestroy(kotlin.Long)(long handle)` `final external int` `https://developer.android.com/reference/androidx/webgpu/GPUHardwareBufferWrapper#nativeEndAccess(kotlin.Long)(long handle)`

## Public constructors

### GPUHardwareBufferExternalTexture

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

```
public GPUHardwareBufferExternalTexture(
    long handle,
    @NonNull GPUExternalTexture externalTexture
)
```

## Public methods

### close

```
public void close()
```

### getExternalTexture

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

```
public final @NonNull GPUExternalTexture getExternalTexture()
```