Skip to main content

RendererConfig

Struct RendererConfig 

Source
pub struct RendererConfig {
    pub crtc_id: u32,
    pub crtc_index: u32,
    pub preferred_size: u32,
    pub forced_plane_id: u32,
    pub allow_legacy: bool,
    pub prefer_legacy: bool,
    pub rotation: Rotation,
}
Expand description

How to set a renderer up.

Fields§

§crtc_id: u32

The CRTC the cursor belongs to, and its index in the resource list.

Both, because the id is what gets written to CRTC_ID and the index is what possible_crtcs is a bitmask over. Deriving one from the other needs the resource list, which the caller already has.

§crtc_index: u32§preferred_size: u32

Cursor size in pixels, or zero to take the driver’s preference.

§forced_plane_id: u32

Use this plane rather than choosing one. Zero to choose.

§allow_legacy: bool

Whether falling back to drmModeSetCursor is acceptable.

§prefer_legacy: bool

Drive the CRTC’s cursor plane through drmModeSetCursor and drmModeMoveCursor rather than atomic commits.

On an atomic driver the legacy cursor ioctls run as an async plane update that does not wait for vblank, so a moving pointer does not contend with the caller’s scanout commits. The atomic path’s blocking one-plane commit per move does: on vc4 it cost the scanout two vblanks in three while the pointer moved (drm-cxx 0925491). Only when the CRTC has a cursor plane that takes ARGB8888; needs allow_legacy; ignored with forced_plane_id. See Renderer::reserved_plane_id.

§rotation: Rotation

Which way up the cursor is drawn.

Trait Implementations§

Source§

impl Clone for RendererConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RendererConfig

Source§

impl Debug for RendererConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RendererConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.