pub struct RenderTaskCache {
    map: FastHashMap<RenderTaskCacheKey, FreeListHandle<RenderTaskCacheMarker>>,
    cache_entries: FreeList<RenderTaskCacheEntry, RenderTaskCacheMarker>,
    frame_id: u64,
}Fields§
§map: FastHashMap<RenderTaskCacheKey, FreeListHandle<RenderTaskCacheMarker>>§cache_entries: FreeList<RenderTaskCacheEntry, RenderTaskCacheMarker>§frame_id: u64Implementations§
Source§impl RenderTaskCache
 
impl RenderTaskCache
pub fn new() -> Self
pub fn clear(&mut self)
pub fn begin_frame(&mut self, texture_cache: &mut TextureCache)
fn alloc_render_task( size: DeviceIntSize, render_task: &mut RenderTask, entry: &mut RenderTaskCacheEntry, gpu_cache: &mut GpuCache, texture_cache: &mut TextureCache, )
pub fn request_render_task( &mut self, key: Option<RenderTaskCacheKey>, texture_cache: &mut TextureCache, is_opaque: bool, parent: RenderTaskParent, gpu_cache: &mut GpuCache, gpu_buffer_builder: &mut GpuBufferBuilderImpl<GpuBufferBlockF>, rg_builder: &mut RenderTaskGraphBuilder, surface_builder: &mut SurfaceBuilder, f: &mut dyn FnMut(&mut RenderTaskGraphBuilder, &mut GpuBufferBuilderImpl<GpuBufferBlockF>, &mut GpuCache) -> RenderTaskId, ) -> RenderTaskId
Sourcefn request_render_task_impl(
    &mut self,
    key: RenderTaskCacheKey,
    is_opaque: bool,
    texture_cache: &mut TextureCache,
    gpu_cache: &mut GpuCache,
    gpu_buffer_builder: &mut GpuBufferBuilderImpl<GpuBufferBlockF>,
    rg_builder: &mut RenderTaskGraphBuilder,
    f: &mut dyn FnMut(&mut RenderTaskGraphBuilder, &mut GpuBufferBuilderImpl<GpuBufferBlockF>, &mut GpuCache) -> RenderTaskId,
) -> (RenderTaskId, bool)
 
fn request_render_task_impl( &mut self, key: RenderTaskCacheKey, is_opaque: bool, texture_cache: &mut TextureCache, gpu_cache: &mut GpuCache, gpu_buffer_builder: &mut GpuBufferBuilderImpl<GpuBufferBlockF>, rg_builder: &mut RenderTaskGraphBuilder, f: &mut dyn FnMut(&mut RenderTaskGraphBuilder, &mut GpuBufferBuilderImpl<GpuBufferBlockF>, &mut GpuCache) -> RenderTaskId, ) -> (RenderTaskId, bool)
Returns the render task id and a boolean indicating whether the task was rendered this frame (was not already in cache).
pub fn get_cache_entry( &self, handle: &WeakFreeListHandle<RenderTaskCacheMarker>, ) -> &RenderTaskCacheEntry
pub fn get_cache_item_for_render_task( &self, texture_cache: &TextureCache, key: &RenderTaskCacheKey, ) -> CacheItem
pub fn get_allocated_size_for_render_task( &self, texture_cache: &TextureCache, key: &RenderTaskCacheKey, ) -> Option<usize>
Trait Implementations§
Source§impl Debug for RenderTaskCache
 
impl Debug for RenderTaskCache
Auto Trait Implementations§
impl Freeze for RenderTaskCache
impl RefUnwindSafe for RenderTaskCache
impl Send for RenderTaskCache
impl Sync for RenderTaskCache
impl Unpin for RenderTaskCache
impl UnwindSafe for RenderTaskCache
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