pub struct MultiWindowCompositor { /* private fields */ }Expand description
Multi-window compositor managing swapchain state and damage scissoring across multiple surfaces.
Implementations§
Source§impl MultiWindowCompositor
impl MultiWindowCompositor
Sourcepub fn register_window(
&mut self,
window_id: u32,
width: u32,
height: u32,
dpr: f32,
)
pub fn register_window( &mut self, window_id: u32, width: u32, height: u32, dpr: f32, )
Registers a new active window surface.
Sourcepub fn unregister_window(&mut self, window_id: u32)
pub fn unregister_window(&mut self, window_id: u32)
Removes an unmapped or closed window.
Sourcepub fn contains_window(&self, window_id: u32) -> bool
pub fn contains_window(&self, window_id: u32) -> bool
Checks if a window is actively managed.
Sourcepub fn mark_damage(&mut self, window_id: u32, damage: Rect)
pub fn mark_damage(&mut self, window_id: u32, damage: Rect)
Marks a damage rect for a specific window.
Sourcepub fn resize_window(
&mut self,
window_id: u32,
width: u32,
height: u32,
) -> Result<(), PresentError>
pub fn resize_window( &mut self, window_id: u32, width: u32, height: u32, ) -> Result<(), PresentError>
Resizes a specific window’s swapchain and damage tracking bounds.
Sourcepub fn render_and_present(
&mut self,
window_id: u32,
display_list: &DisplayList,
force_full_redraw: bool,
) -> Result<&[u8], PresentError>
pub fn render_and_present( &mut self, window_id: u32, display_list: &DisplayList, force_full_redraw: bool, ) -> Result<&[u8], PresentError>
Renders and presents a frame for the specified window, returning a reference to the presented BGRA buffer.
Sourcepub fn window_count(&self) -> usize
pub fn window_count(&self) -> usize
Returns the number of currently active windows.
Trait Implementations§
Auto Trait Implementations§
impl Forget for MultiWindowCompositor
impl Freeze for MultiWindowCompositor
impl Move for MultiWindowCompositor
impl RefUnwindSafe for MultiWindowCompositor
impl Send for MultiWindowCompositor
impl Sync for MultiWindowCompositor
impl Unpin for MultiWindowCompositor
impl UnsafeUnpin for MultiWindowCompositor
impl UnwindSafe for MultiWindowCompositor
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