pub enum PowerMode {
Off,
On,
Doze,
DozeSuspend,
// some variants omitted
}Expand description
The power mode of the display hardware.
Variants§
Off
Minimize power consumption while keeping the display blank.
Conceptually, the user asked that the display be powered off.
All supporting hardware is in the lowest supported power state, which is ideally “off”.
While in this mode, the display will not generate VSync events.
While in this mode, newly applied display configs will not be reflected on the display. The latest applied config will be reflected on the display once it enters a different power state.
All display devices must support this power mode.
On
Maximize display fidelity, accepting higher power consumption.
Conceptually, the user is fully engaged with the device.
The display may still use power optimizations that do not reduce the user perceived displayed image quality, such as DSC (Display Stream Compression), dynamic refresh rates, or partial refresh.
All display devices must support this power mode.
Doze
Reduce power consumption at the cost of display fidelity.
Conceptually, the user is not fully engaged with the device, but may occasionally glance at the screen.
The display hardware may reduce the displayed image quality in order to save power. The image quality must remain suitable for presenting ambient information to the user.
A display device must support both DOZE and DOZE_SUSPEND power
modes, or neither.
DozeSuspend
Reduce power consumption at the cost of display fidelity and freshness.
Conceptually, the user is not fully engaged with the device, but may occasionally glance at the screen. Additionally, the user prefers saving power to seeing an updated display.
In addition to the power savings allowed by the DOZE mode, the display
hardware is also free to save power by preserving the old display state,
instead of applying new display configs.
The display still emits VSync events to acknowledge newly applied display configs. The latest applied config will be reflected on the display once it enters a different power state.
A display device must support both DOZE and DOZE_SUSPEND power
modes, or neither.
Implementations§
Source§impl PowerMode
impl PowerMode
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<PowerMode, D> for PowerMode
impl<D: ResourceDialect> Decode<PowerMode, D> for PowerMode
Source§impl Ord for PowerMode
impl Ord for PowerMode
Source§impl PartialOrd for PowerMode
impl PartialOrd for PowerMode
Source§impl TypeMarker for PowerMode
impl TypeMarker for PowerMode
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.