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: DeviceIntSizeSize 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: EntryDetailsDetails specific to standalone or shared items.
user_data: [f32; 4]Arbitrary user data associated with this item.
last_access: FrameStampThe last frame this item was requested for rendering.
uv_rect_handle: GpuCacheHandleHandle to the resource rect in the GPU cache.
input_format: ImageFormatImage format of the data that the entry expects.
filter: TextureFilter§swizzle: Swizzle§texture_id: CacheTextureIdThe 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: UvRectKindThe type of UV rect this entry specifies.
shader: TargetShaderImplementations§
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