Skip to main content

stage

Function stage 

Source
pub fn stage(
    request: &mut AtomicRequest,
    props: &PropertyStore,
    placement: &PlaneState,
) -> Result<usize, CursorError>
Expand description

Write placement into request.

Every property, every commit. Drivers accept partial writes, but a plane that went dark during a hide needs all of it re-armed to come back, and writing the lot is cheaper than tracking which fields a given transition dirtied.

rotation, HOTSPOT_X and HOTSPOT_Y are optional and skipped when the plane does not carry them. The hotspot properties are a hint for virtualized drivers, which need to know where inside the sprite the pointer actually is; before anything has been drawn they are left alone rather than clobbered with a stale zero.

Returns how many properties were written.

ยงErrors

CursorError::MissingProperty if the plane lacks one of the properties every plane is required to have. That is a broken driver rather than anything a caller did.