Trait avrox_display::DisplayDevice
source · pub trait DisplayDevice: Send + Sync {
type PIXEL;
// Required methods
fn reset(&self) -> GfxResult<()>;
fn request_power_level(&self, level: PowerLevel) -> GfxResult<()>;
fn render<RPIXEL, RENDERABLE>(&self, scene: &RENDERABLE) -> GfxResult<()>
where RPIXEL: Into<Self::PIXEL>,
RENDERABLE: Renderable<PIXEL = RPIXEL>;
// Provided method
fn render_changed<RPIXEL, RENDERABLE>(
&self,
scene: &RENDERABLE
) -> GfxResult<()>
where RPIXEL: Into<Self::PIXEL>,
RENDERABLE: Renderable<PIXEL = RPIXEL> { ... }
}
Required Associated Types§
Required Methods§
sourcefn request_power_level(&self, level: PowerLevel) -> GfxResult<()>
fn request_power_level(&self, level: PowerLevel) -> GfxResult<()>
Request the display device moves to the indicated power level.
sourcefn render<RPIXEL, RENDERABLE>(&self, scene: &RENDERABLE) -> GfxResult<()>
fn render<RPIXEL, RENDERABLE>(&self, scene: &RENDERABLE) -> GfxResult<()>
Render the given scene in its entirety, replacing whatever is on the screen already
Provided Methods§
sourcefn render_changed<RPIXEL, RENDERABLE>(
&self,
scene: &RENDERABLE
) -> GfxResult<()>
fn render_changed<RPIXEL, RENDERABLE>( &self, scene: &RENDERABLE ) -> GfxResult<()>
Render only the parts of the display that have - or may have - changed since the last time it was rendered. The worst-case, always correct, implementation of this method will just redraw the entire display - however the driver may be able to make more efficient choices than that.
Object Safety§
This trait is not object safe.