Struct webrender::render_task_cache::RenderTaskCache
source · 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: u64
Implementations§
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<F>(
&mut self,
key: RenderTaskCacheKey,
texture_cache: &mut TextureCache,
gpu_cache: &mut GpuCache,
gpu_buffer_builder: &mut GpuBufferBuilderImpl<GpuBufferBlockF>,
rg_builder: &mut RenderTaskGraphBuilder,
user_data: Option<[f32; 4]>,
is_opaque: bool,
parent: RenderTaskParent,
surface_builder: &mut SurfaceBuilder,
f: F,
) -> Result<RenderTaskId, ()>where
F: FnOnce(&mut RenderTaskGraphBuilder, &mut GpuBufferBuilderImpl<GpuBufferBlockF>) -> Result<RenderTaskId, ()>,
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