pub struct BufferObject { /* private fields */ }Expand description
An object holding a double-buffered compositor surface for a window.
Implementations§
Source§impl BufferObject
impl BufferObject
pub fn id(&self) -> ObjID
pub fn create_new(w: u32, h: u32) -> Result<Self, TwzError>
Sourcepub fn has_data_for_read(&self) -> bool
pub fn has_data_for_read(&self) -> bool
Returns true if the buffers currently need to be read out.
Sourcepub fn read_buffer<R>(&self, f: impl FnMut(Buffer<'_>, u32, u32) -> R) -> R
pub fn read_buffer<R>(&self, f: impl FnMut(Buffer<'_>, u32, u32) -> R) -> R
Read out the compositor buffer.
Sourcepub fn read_done(&self, new_w: u32, new_h: u32)
pub fn read_done(&self, new_w: u32, new_h: u32)
Mark that the compositor has finished reading the buffer. Provides the new width and height to use next time this buffer should be filled out. These values may be unchanged.
Trait Implementations§
Source§impl Clone for BufferObject
impl Clone for BufferObject
Source§fn clone(&self) -> BufferObject
fn clone(&self) -> BufferObject
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<Object<DisplayBufferBase>> for BufferObject
impl From<Object<DisplayBufferBase>> for BufferObject
Source§fn from(obj: Object<DisplayBufferBase>) -> Self
fn from(obj: Object<DisplayBufferBase>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BufferObject
impl !ObjSafe for BufferObject
impl !RefUnwindSafe for BufferObject
impl Send for BufferObject
impl !StoreCopy for BufferObject
impl Sync for BufferObject
impl Unpin for BufferObject
impl !UnwindSafe for BufferObject
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