DisplayLuts
class DisplayLuts
| kotlin.Any | |
| ↳ | android.hardware.DisplayLuts |
DisplayLuts provides the developers to apply Lookup Tables (Luts) to a android.view.SurfaceControl. Luts provides ways to control tonemapping for specific content. The general flow for how DisplayLuts fits into a display pipeline is as follows:
DisplayLuts flow Or in list form:
- A
android.view.SurfaceControl's content is converted to RGB colors, if the source is YUV. - The RGB colors are de-gammed into linear values, normalized to the range of [0, 1].
- The linear values are passed through a 1D LUT (if set). The 1D LUT looks up and applies gain multipliers.
- The linear values are passed through a 3D LUT (if set). The 3D LUT maps input colors to a final linear color.
- The output values are transformed to the panel color gamut, and then gammed to arrive at the final color.
Importantly: the LUT is applied on colors in linear space, in the source content's color gamut.
Summary
| Nested classes | |
|---|---|
| Public constructors | |
|---|---|
|
Create a |
|
| Public methods | |
|---|---|
| Unit |
set(entry: DisplayLuts.Entry)Set a Lut to be applied. |
| Unit |
set(first: DisplayLuts.Entry, second: DisplayLuts.Entry)Set Luts in order to be applied. |
| String |
toString()Returns a string representation of the object. |
Public constructors
Public methods
set
fun set(entry: DisplayLuts.Entry): Unit
Set a Lut to be applied.
Use either this or set(Entry,Entry). The function will replace any previously set lut(s).
| Parameters | |
|---|---|
entry |
DisplayLuts.Entry: Either an 1D Lut or a 3D Lut. This value cannot be null. |
set
fun set(
first: DisplayLuts.Entry,
second: DisplayLuts.Entry
): Unit
Set Luts in order to be applied.
An 1D Lut and 3D Lut will be applied in order. Use either this or set(Entry). The function will replace any previously set lut(s)
| Parameters | |
|---|---|
first |
DisplayLuts.Entry: An 1D Lut. This value cannot be null. |
second |
DisplayLuts.Entry: A 3D Lut. This value cannot be null. |
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |