Skip to main content

DrmOutput

Struct DrmOutput 

Source
pub struct DrmOutput { /* private fields */ }
Expand description

A KMS output: a connector of a card, drawn with OpenGL.

Implementations§

Source§

impl DrmOutput

Source

pub fn new_with_mode_and_options( card: DrmCard, resources: &DrmResources, connector: &DrmConnector, mode_info: &DrmModeInfo, options: Option<DrmOutputOptions>, ) -> Result<Arc<Self>>

The output of a connector and a mode of the card that are already chosen, with options.

Source

pub fn new( path: Option<&str>, connectors_force_probe: bool, options: Option<DrmOutputOptions>, ) -> Result<Arc<Self>>

Opens the card path (or the first usable card) and drives its first connected connector (of the options’ connector type and type identifier) in the options’ video mode or its preferred mode.

Source

pub fn from_card( card: DrmCard, connectors_force_probe: bool, options: Option<DrmOutputOptions>, ) -> Result<Arc<Self>>

As new, on a card that is open.

Source

pub fn new_with_mode( card: DrmCard, resources: &DrmResources, connector: &DrmConnector, mode_info: &DrmModeInfo, ) -> Result<Arc<Self>>

The output of a connector and a mode of the card that are already chosen, with the default options.

Source

pub fn set_orientation(&self, value: SurfaceOrientation)

Source

pub fn card(&self) -> &DrmCard

The card the output drives. An addition, for reading back what the card shows (drm_scanout).

Source

pub fn crtc_id(&self) -> u32

The CRTC that shows the output. An addition, as card.

Source

pub fn create_gl_render_target_of_primary_context( &self, ) -> Rc<dyn IGlPlatformSurfaceRenderTarget>

The render target over the output’s context (CreateGlRenderTarget()).

§Panics

As IPlatformGraphics::get_shared_context of the output’s platform graphics: the call creates the EGL objects when this is the first.

Source

pub fn create_context(&self) -> Rc<dyn IGlContext>

§Panics

Always, as the reference (NotImplementedException).

Trait Implementations§

Source§

impl IGlOutputBackend for DrmOutput

Source§

impl IGlPlatformSurface for DrmOutput

Source§

fn create_gl_render_target( &self, context: &Rc<dyn IGlContext>, ) -> Rc<dyn IGlPlatformSurfaceRenderTarget>

§Panics

When context is not the context of the output (the exception of the reference).

Source§

impl IOutputBackend for DrmOutput

Source§

fn pixel_size(&self) -> PixelSize

Source§

fn scaling(&self) -> f64

Source§

fn set_scaling(&self, value: f64)

Source§

fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ

The output as the render surface of the top-level.
Source§

fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend>

The output as one that renders with OpenGL (the reference tests the type).
Source§

fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation>

The output as one that has an orientation (the reference tests the type).
Source§

impl IPlatformRenderSurface for DrmOutput

Source§

fn try_get_surface_kind(&self, kind: TypeId) -> Option<Rc<dyn Any>>

The surface viewed as a surface kind defined outside this crate: for TypeId::of::<dyn IFoo>() the result holds an Rc<dyn IFoo>.
Source§

fn as_any(&self) -> &dyn Any

Lets the backend recover the concrete surface type.
Source§

fn is_ready(&self) -> bool

Whether the surface is ready to be rendered to.
Source§

fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>

The surface as a framebuffer surface, if it is one.
Source§

fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>

The text rendering settings of the platform for this surface, when the platform knows them: the render backend asks for them every frame (they follow the settings of the system and the display the surface is on). A backend asks every surface of a top-level and takes the first answer; None from all of them gives the defaults of the backend (docs/porting/text-rendering.md).
Source§

impl ISurfaceOrientation for DrmOutput

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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, 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.