Added in API level 35

OverlayProperties


class OverlayProperties : Parcelable
kotlin.Any
   ↳ android.hardware.OverlayProperties

Provides supported overlay properties of the device.

Hardware overlay is a technique to composite different buffers directly to the screen using display hardware rather than the GPU. The system compositor is able to assign any content managed by a android.view.SurfaceControl onto a hardware overlay if possible. Applications may be interested in the display hardware capabilities exposed by this class as a hint to determine if their android.view.SurfaceControl tree is power-efficient and performant.

Summary

Inherited constants
Public methods
Int

Boolean
isCombinationSupported(dataspace: Int, format: Int)

Indicates that hardware composition of a buffer encoded with the provided DataSpace and android.

Boolean

Indicates that hardware composition of two or more overlays with different colorspaces is supported on the device.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<OverlayProperties!>

Public methods

describeContents

Added in API level 35
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

isCombinationSupported

Added in API level 35
fun isCombinationSupported(
    dataspace: Int,
    format: Int
): Boolean

Indicates that hardware composition of a buffer encoded with the provided DataSpace and android.hardware.HardwareBuffer.Format is supported on the device.

Parameters
dataspace Int: Value is either 0 or a combination of android.hardware.DataSpace#DATASPACE_UNKNOWN, android.hardware.DataSpace#DATASPACE_SCRGB_LINEAR, android.hardware.DataSpace#DATASPACE_SRGB, android.hardware.DataSpace#DATASPACE_SCRGB, android.hardware.DataSpace#DATASPACE_DISPLAY_P3, android.hardware.DataSpace#DATASPACE_BT2020_HLG, android.hardware.DataSpace#DATASPACE_BT2020_PQ, android.hardware.DataSpace#DATASPACE_ADOBE_RGB, android.hardware.DataSpace#DATASPACE_JFIF, android.hardware.DataSpace#DATASPACE_BT601_625, android.hardware.DataSpace#DATASPACE_BT601_525, android.hardware.DataSpace#DATASPACE_BT2020, android.hardware.DataSpace#DATASPACE_BT709, android.hardware.DataSpace#DATASPACE_DCI_P3, and android.hardware.DataSpace#DATASPACE_SRGB_LINEAR
format Int: Value is android.hardware.HardwareBuffer#RGBA_8888, android.hardware.HardwareBuffer#RGBA_FP16, android.hardware.HardwareBuffer#RGBA_1010102, android.hardware.HardwareBuffer#RGBX_8888, android.hardware.HardwareBuffer#RGB_888, android.hardware.HardwareBuffer#RGB_565, android.hardware.HardwareBuffer#BLOB, android.hardware.HardwareBuffer#YCBCR_420_888, android.hardware.HardwareBuffer#D_16, android.hardware.HardwareBuffer#D_24, android.hardware.HardwareBuffer#DS_24UI8, android.hardware.HardwareBuffer#D_FP32, android.hardware.HardwareBuffer#DS_FP32UI8, android.hardware.HardwareBuffer#S_UI8, android.hardware.HardwareBuffer#YCBCR_P010, android.hardware.HardwareBuffer#R_8, android.hardware.HardwareBuffer#R_16, android.hardware.HardwareBuffer#RG_1616, or android.hardware.HardwareBuffer#RGBA_10101010
Return
Boolean True if the device can support efficiently compositing the content described by the dataspace and format. False if GPU composition fallback is otherwise required.

isMixedColorSpacesSupported

Added in API level 35
fun isMixedColorSpacesSupported(): Boolean

Indicates that hardware composition of two or more overlays with different colorspaces is supported on the device.

Return
Boolean True if the device can support mixed colorspaces efficiently, false if GPU composition fallback is otherwise required.

writeToParcel

Added in API level 35
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 35
static val CREATOR: Parcelable.Creator<OverlayProperties!>