pub struct SoftwareSurfacePresenter {
pub width: u32,
pub height: u32,
pub format: SwapchainFormat,
pub backing_buffer: Vec<u8>,
pub presented_frames: u64,
pub damage_clipped_frames: u64,
}Expand description
Zero-dependency software presentation surface holding a target backing pixel store.
Fields§
§width: u32§height: u32§format: SwapchainFormat§backing_buffer: Vec<u8>§presented_frames: u64§damage_clipped_frames: u64Implementations§
Source§impl SoftwareSurfacePresenter
impl SoftwareSurfacePresenter
Sourcepub fn new(
width: u32,
height: u32,
format: SwapchainFormat,
) -> SoftwareSurfacePresenter
pub fn new( width: u32, height: u32, format: SwapchainFormat, ) -> SoftwareSurfacePresenter
Creates a new software presentation surface initialized with the specified size and format.
Trait Implementations§
Source§impl Clone for SoftwareSurfacePresenter
impl Clone for SoftwareSurfacePresenter
Source§fn clone(&self) -> SoftwareSurfacePresenter
fn clone(&self) -> SoftwareSurfacePresenter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SoftwareSurfacePresenter
impl Debug for SoftwareSurfacePresenter
Source§impl SurfacePresenter for SoftwareSurfacePresenter
impl SurfacePresenter for SoftwareSurfacePresenter
Source§fn present(
&mut self,
buffer: &FrameBuffer,
damage: Option<Rect>,
) -> Result<(), PresentError>
fn present( &mut self, buffer: &FrameBuffer, damage: Option<Rect>, ) -> Result<(), PresentError>
Presents the contents of the given framebuffer to the display surface, optionally clipped to damage.
Source§fn resize(&mut self, width: u32, height: u32) -> Result<(), PresentError>
fn resize(&mut self, width: u32, height: u32) -> Result<(), PresentError>
Notifies the presentation surface of a dimension resize.
Source§fn surface_size(&self) -> (u32, u32)
fn surface_size(&self) -> (u32, u32)
Returns physical surface dimensions as (width, height).
Auto Trait Implementations§
impl Forget for SoftwareSurfacePresenter
impl Freeze for SoftwareSurfacePresenter
impl Move for SoftwareSurfacePresenter
impl RefUnwindSafe for SoftwareSurfacePresenter
impl Send for SoftwareSurfacePresenter
impl Sync for SoftwareSurfacePresenter
impl Unpin for SoftwareSurfacePresenter
impl UnsafeUnpin for SoftwareSurfacePresenter
impl UnwindSafe for SoftwareSurfacePresenter
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
Mutably borrows from an owned value. Read more