Struct webrender::renderer::BufferDamageTracker
source · pub(crate) struct BufferDamageTracker {
damage_rects: [DeviceRect; 4],
current_offset: usize,
}
Expand description
Tracks buffer damage rects over a series of frames.
Fields§
§damage_rects: [DeviceRect; 4]
§current_offset: usize
Implementations§
source§impl BufferDamageTracker
impl BufferDamageTracker
sourcefn push_dirty_rect(&mut self, rect: &DeviceRect)
fn push_dirty_rect(&mut self, rect: &DeviceRect)
Sets the damage rect for the current frame. Should only be called after get_damage_rect() has been called to get the current backbuffer’s damage rect.
sourcefn get_damage_rect(&self, buffer_age: usize) -> Option<DeviceRect>
fn get_damage_rect(&self, buffer_age: usize) -> Option<DeviceRect>
Gets the damage rect for the current backbuffer, given the backbuffer’s age. (The number of frames since it was previously the backbuffer.) Returns an empty rect if the buffer is valid, and None if the entire buffer is invalid.
Trait Implementations§
source§impl Debug for BufferDamageTracker
impl Debug for BufferDamageTracker
source§impl Default for BufferDamageTracker
impl Default for BufferDamageTracker
source§fn default() -> BufferDamageTracker
fn default() -> BufferDamageTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BufferDamageTracker
impl RefUnwindSafe for BufferDamageTracker
impl Send for BufferDamageTracker
impl Sync for BufferDamageTracker
impl Unpin for BufferDamageTracker
impl UnwindSafe for BufferDamageTracker
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more