fuchsia.ui.display.singleton

Added: 12

PROTOCOLS

DisplayPower

Defined in fuchsia.ui.display.singleton/power.fidl

Controls the power state of the default display device.

Added: HEAD

SetDisplayPower

Set the power state of the default connected display device to power_on.

When successfull, the connected display is turned on or off. Once the display device is turned off, fuchsia.hardware.display/Coordinator clients will not receive OnVsync events anymore until the display device is turned on again.

Fails with ZX_ERR_NOT_SUPPORTED if the connected display fails to turn on/off.

All display devices are turned on by default.

Request

NameType
power_on bool

Response

NameType
payload DisplayPower_SetDisplayPower_Result

SetPowerMode

Set the power state of the default connected display device to power_mode.

Errors:

  • ZX_ERR_NOT_FOUND: There is no connected display.
  • ZX_ERR_NOT_SUPPORTED: The default connected display driver or hardware does not support the requested power mode.
  • ZX_ERR_INTERNAL: Operation failed for another reason.

Request

NameType
power_mode PowerMode

Response

NameType
payload DisplayPower_SetPowerMode_Result

Info

Defined in fuchsia.ui.display.singleton/info.fidl

Get information about Scenic's primary display.

GetMetrics

Request

<EMPTY>

Response

NameType
info Metrics

VsyncSource

Defined in fuchsia.ui.display.singleton/vsync_source.fidl

Added: HEAD

OnVsync

Notifies the client that a vsync event has occurred.

Response

NameType
timestamp zx/Time

SetVsyncEnabled

Enables or disables receiving OnVsync for the given display.

The client receives OnVsync callbacks iff this function is called with enabled=true. Calling this with enabled=false stops generating callbacks. Note that there may be a race with a server receiving this and extra OnVsync may be received.

By default, the listener is assumed to have called enabled=false.

Request

NameType
enabled bool

STRUCTS

DisplayPower_SetDisplayPower_Response

Defined in fuchsia.ui.display.singleton/power.fidl

<EMPTY>

DisplayPower_SetPowerMode_Response

Defined in fuchsia.ui.display.singleton/power.fidl

<EMPTY>

ENUMS

PowerMode flexible

Type: uint32

Defined in fuchsia.ui.display.singleton/power.fidl

The power mode of the display hardware.

Added: HEAD

NameValueDescription
0

The display is powered off. The hardware will not apply new display configs nor generate new VSync events.

All display devices must support this power mode.

1

The display is fully powered on.

All display devices must support this power mode.

2

The display is powered on and configured in a low power state that is suitable for presenting ambient information to the user, possibly with lower fidelity than ON, but with greater efficiency.

A display device must support both DOZE and DOZE_SUSPEND power modes, or neither.

3

The display is configured as the same state in DOZE but may stop applying display updates from the client.

This is effectively a hint to the device that drawing to the display has been suspended and that the device must remain in a low power state and continue displaying its current contents indefinitely until the power mode changes.

A display device must support both DOZE and DOZE_SUSPEND power modes, or neither. When both modes are supported, the display device is allowed to not use the hint above, in which case DOZE_SUSPEND is identical to DOZE.

TABLES

Metrics

Defined in fuchsia.ui.display.singleton/info.fidl

Describes the physical display, and how to map between physical and logical pixels.

OrdinalFieldTypeDescription
extent_in_px fuchsia.math/SizeU

Same meaning as horizontal_resolution and vertical_resolution in fuchsia.hardware.display.Mode. Given in physical pixels.

extent_in_mm fuchsia.math/SizeU

Same meaning as horizontal_size_mm and vertical_size_mm in fuchsia.hardware.display.Info.

recommended_device_pixel_ratio fuchsia.math/VecF

The number of physical pixels per "logical" pixel, for example as in fuchsia.ui.composition.LayoutInfo.logical_size. It provides an indication of the size of image buffers that should be allocated. This value would typically be used by a component near the root of the scene graph to set a scale for the rest of the scene beneath.

maximum_refresh_rate_in_millihertz uint32

The maximum mumber of images transmitted to the display in 1000 seconds. This is the display's maximum vertical refresh rate, in millihertz (0.001 Hz).

Added: 16

UNIONS

DisplayPower_SetDisplayPower_Result strict

Defined in fuchsia.ui.display.singleton/power.fidl

OrdinalVariantTypeDescription
response DisplayPower_SetDisplayPower_Response
err zx/Status

DisplayPower_SetPowerMode_Result strict

Defined in fuchsia.ui.display.singleton/power.fidl

OrdinalVariantTypeDescription
response DisplayPower_SetPowerMode_Response
err zx/Status
framework_err internal