# PowerPreference

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

*** ** * ** ***


```
class PowerPreference
```

<br />

*** ** * ** ***

Defines the power consumption preference when requesting an adapter.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/PowerPreference#HighPerformance() = 2` Prefers a high-performance adapter. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/PowerPreference#LowPower() = 1` Prefers a power-saving adapter. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/PowerPreference#Undefined() = 0` No power preference is specified. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/PowerPreference#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### HighPerformance

```
const val HighPerformance = 2: Int
```

Prefers a high-performance adapter.

### LowPower

```
const val LowPower = 1: Int
```

Prefers a power-saving adapter.

### Undefined

```
const val Undefined = 0: Int
```

No power preference is specified.

## Public companion functions

### toString

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

```
fun toString(value: Int): String
```