pub struct DrmOutput { /* private fields */ }Expand description
A KMS output: a connector of a card, drawn with OpenGL.
Implementations§
Source§impl DrmOutput
impl DrmOutput
Sourcepub fn new_with_mode_and_options(
card: DrmCard,
resources: &DrmResources,
connector: &DrmConnector,
mode_info: &DrmModeInfo,
options: Option<DrmOutputOptions>,
) -> Result<Arc<Self>>
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.
Sourcepub fn new(
path: Option<&str>,
connectors_force_probe: bool,
options: Option<DrmOutputOptions>,
) -> Result<Arc<Self>>
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.
Sourcepub fn from_card(
card: DrmCard,
connectors_force_probe: bool,
options: Option<DrmOutputOptions>,
) -> Result<Arc<Self>>
pub fn from_card( card: DrmCard, connectors_force_probe: bool, options: Option<DrmOutputOptions>, ) -> Result<Arc<Self>>
As new, on a card that is open.
Sourcepub fn new_with_mode(
card: DrmCard,
resources: &DrmResources,
connector: &DrmConnector,
mode_info: &DrmModeInfo,
) -> Result<Arc<Self>>
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.
pub fn set_orientation(&self, value: SurfaceOrientation)
Sourcepub fn card(&self) -> &DrmCard
pub fn card(&self) -> &DrmCard
The card the output drives. An addition, for reading back what
the card shows (drm_scanout).
Sourcepub fn create_gl_render_target_of_primary_context(
&self,
) -> Rc<dyn IGlPlatformSurfaceRenderTarget>
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.
Sourcepub fn create_context(&self) -> Rc<dyn IGlContext>
pub fn create_context(&self) -> Rc<dyn IGlContext>
§Panics
Always, as the reference (NotImplementedException).
Trait Implementations§
Source§impl IGlOutputBackend for DrmOutput
impl IGlOutputBackend for DrmOutput
fn platform_graphics(&self) -> Arc<dyn IPlatformGraphics> ⓘ
Source§impl IGlPlatformSurface for DrmOutput
impl IGlPlatformSurface for DrmOutput
Source§fn create_gl_render_target(
&self,
context: &Rc<dyn IGlContext>,
) -> Rc<dyn IGlPlatformSurfaceRenderTarget>
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
impl IOutputBackend for DrmOutput
fn pixel_size(&self) -> PixelSize
fn scaling(&self) -> f64
fn set_scaling(&self, value: f64)
Source§fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ
fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ
Source§fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend>
fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend>
Source§fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation>
fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation>
Source§impl IPlatformRenderSurface for DrmOutput
impl IPlatformRenderSurface for DrmOutput
Source§fn try_get_surface_kind(&self, kind: TypeId) -> Option<Rc<dyn Any>>
fn try_get_surface_kind(&self, kind: TypeId) -> Option<Rc<dyn Any>>
TypeId::of::<dyn IFoo>() the result holds an Rc<dyn IFoo>.Source§fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>
fn as_framebuffer_surface(&self) -> Option<&dyn IFramebufferPlatformSurface>
Source§fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>
fn text_rendering_parameters(&self) -> Option<PlatformTextRenderingParameters>
None from all of them gives the defaults
of the backend (docs/porting/text-rendering.md).Source§impl ISurfaceOrientation for DrmOutput
impl ISurfaceOrientation for DrmOutput
fn orientation(&self) -> SurfaceOrientation
Auto Trait Implementations§
impl !RefUnwindSafe for DrmOutput
impl !UnwindSafe for DrmOutput
impl Freeze for DrmOutput
impl Send for DrmOutput
impl Sync for DrmOutput
impl Unpin for DrmOutput
impl UnsafeUnpin for DrmOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more