pub struct DirtyRegion {
pub start_frame: u64,
pub end_frame: u64,
}Expand description
A contiguous range of frames that require re-rendering.
Fields§
§start_frame: u64First dirty frame (inclusive).
end_frame: u64Last dirty frame (exclusive).
Implementations§
Source§impl DirtyRegion
impl DirtyRegion
Sourcepub fn new(start_frame: u64, end_frame: u64) -> Self
pub fn new(start_frame: u64, end_frame: u64) -> Self
Create a new dirty region.
If end_frame <= start_frame the region is normalised to a single-frame
region [start_frame, start_frame + 1).
Sourcepub fn overlaps(&self, other: &DirtyRegion) -> bool
pub fn overlaps(&self, other: &DirtyRegion) -> bool
Returns true when the two regions overlap or are adjacent.
Sourcepub fn merge(&self, other: &DirtyRegion) -> DirtyRegion
pub fn merge(&self, other: &DirtyRegion) -> DirtyRegion
Merge two regions into a bounding region covering both.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Number of frames covered by this region.
Trait Implementations§
Source§impl Clone for DirtyRegion
impl Clone for DirtyRegion
Source§fn clone(&self) -> DirtyRegion
fn clone(&self) -> DirtyRegion
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 moreimpl Copy for DirtyRegion
Source§impl Debug for DirtyRegion
impl Debug for DirtyRegion
impl Eq for DirtyRegion
Source§impl PartialEq for DirtyRegion
impl PartialEq for DirtyRegion
Source§fn eq(&self, other: &DirtyRegion) -> bool
fn eq(&self, other: &DirtyRegion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DirtyRegion
Auto Trait Implementations§
impl Freeze for DirtyRegion
impl RefUnwindSafe for DirtyRegion
impl Send for DirtyRegion
impl Sync for DirtyRegion
impl Unpin for DirtyRegion
impl UnsafeUnpin for DirtyRegion
impl UnwindSafe for DirtyRegion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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