Struct webrender::texture_cache::CacheEntry
source · pub struct CacheEntry {
pub size: DeviceIntSize,
pub details: EntryDetails,
pub user_data: [f32; 4],
pub last_access: FrameStamp,
pub uv_rect_handle: GpuCacheHandle,
pub input_format: ImageFormat,
pub filter: TextureFilter,
pub swizzle: Swizzle,
pub texture_id: CacheTextureId,
pub eviction_notice: Option<EvictionNotice>,
pub uv_rect_kind: UvRectKind,
pub shader: TargetShader,
}
Fields§
§size: DeviceIntSize
Size of the requested item, in device pixels. Does not include any padding for alignment that the allocator may have added to this entry’s allocation.
details: EntryDetails
Details specific to standalone or shared items.
user_data: [f32; 4]
Arbitrary user data associated with this item.
last_access: FrameStamp
The last frame this item was requested for rendering.
uv_rect_handle: GpuCacheHandle
Handle to the resource rect in the GPU cache.
input_format: ImageFormat
Image format of the data that the entry expects.
filter: TextureFilter
§swizzle: Swizzle
§texture_id: CacheTextureId
The actual device texture ID this is part of.
eviction_notice: Option<EvictionNotice>
Optional notice when the entry is evicted from the cache.
uv_rect_kind: UvRectKind
The type of UV rect this entry specifies.
shader: TargetShader
Implementations§
source§impl CacheEntry
impl CacheEntry
fn new_standalone( texture_id: CacheTextureId, last_access: FrameStamp, params: &CacheAllocParams, swizzle: Swizzle, size_in_bytes: usize, ) -> Self
fn update_gpu_cache(&mut self, gpu_cache: &mut GpuCache)
fn evict(&self)
fn alternative_input_format(&self) -> ImageFormat
Trait Implementations§
source§impl Debug for CacheEntry
impl Debug for CacheEntry
source§impl MallocSizeOf for CacheEntry
impl MallocSizeOf for CacheEntry
source§fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for CacheEntry
impl !RefUnwindSafe for CacheEntry
impl !Send for CacheEntry
impl !Sync for CacheEntry
impl Unpin for CacheEntry
impl !UnwindSafe for CacheEntry
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