# GPUTextureComponentSwizzleDescriptor

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

*** ** * ** ***


```
public final class GPUTextureComponentSwizzleDescriptor
```

<br />

*** ** * ** ***

An extension chained to a texture view descriptor to define a custom component swizzle. This allows remapping or forcing specific values for the R, G, B, and A channels when accessing the texture view.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzleDescriptor#GPUTextureComponentSwizzleDescriptor(androidx.webgpu.GPUTextureComponentSwizzle)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle swizzle )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzleDescriptor#getSwizzle()()` The swizzle configuration specifying the source component or constant value for each channel of the texture view. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzleDescriptor#setSwizzle(androidx.webgpu.GPUTextureComponentSwizzle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUTextureComponentSwizzle value)` The swizzle configuration specifying the source component or constant value for each channel of the texture view. |

## Public constructors

### GPUTextureComponentSwizzleDescriptor

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

```
public GPUTextureComponentSwizzleDescriptor(
    @NonNull GPUTextureComponentSwizzle swizzle
)
```

## Public methods

### getSwizzle

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

```
public final @NonNull GPUTextureComponentSwizzle getSwizzle()
```

The swizzle configuration specifying the source component or constant value for each channel of the texture view.

### setSwizzle

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

```
public final void setSwizzle(@NonNull GPUTextureComponentSwizzle value)
```

The swizzle configuration specifying the source component or constant value for each channel of the texture view.