Struct webrender::resource_cache::RenderTarget
source · struct RenderTarget {
size: DeviceIntSize,
format: ImageFormat,
texture_id: CacheTextureId,
is_active: bool,
last_frame_used: FrameId,
}
Expand description
Internal information about allocated render targets in the pool
Fields§
§size: DeviceIntSize
§format: ImageFormat
§texture_id: CacheTextureId
§is_active: bool
If true, this is currently leant out, and not available to other passes
last_frame_used: FrameId
Implementations§
source§impl RenderTarget
impl RenderTarget
fn size_in_bytes(&self) -> usize
sourcepub fn used_recently(&self, current_frame_id: FrameId, threshold: u64) -> bool
pub fn used_recently(&self, current_frame_id: FrameId, threshold: u64) -> bool
Returns true if this texture was used within threshold
frames of
the current frame.
Auto Trait Implementations§
impl Freeze for RenderTarget
impl RefUnwindSafe for RenderTarget
impl Send for RenderTarget
impl Sync for RenderTarget
impl Unpin for RenderTarget
impl UnwindSafe for RenderTarget
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