Struct webrender::internal_types::TextureUpdateList
source · pub struct TextureUpdateList {
pub clears_shared_cache: bool,
pub allocations: Vec<TextureCacheAllocation>,
pub updates: FastHashMap<CacheTextureId, Vec<TextureCacheUpdate>>,
pub copies: FastHashMap<(CacheTextureId, CacheTextureId), Vec<TextureCacheCopy>>,
}
Expand description
Atomic set of commands to manipulate the texture cache, generated on the RenderBackend thread and executed on the Renderer thread.
The list of allocation operations is processed before the updates. This is important to allow coalescing of certain allocation operations.
Fields§
Indicates that there was some kind of cleanup clear operation. Used for sanity checks.
allocations: Vec<TextureCacheAllocation>
Commands to alloc/realloc/free the textures. Processed first.
updates: FastHashMap<CacheTextureId, Vec<TextureCacheUpdate>>
Commands to update the contents of the textures. Processed second.
copies: FastHashMap<(CacheTextureId, CacheTextureId), Vec<TextureCacheCopy>>
Commands to move items within the cache, these are applied before everything else in the update list.
Implementations§
source§impl TextureUpdateList
impl TextureUpdateList
sourcepub fn note_clear(&mut self)
pub fn note_clear(&mut self)
Sets the clears_shared_cache flag for renderer-side sanity checks.
sourcepub fn push_update(&mut self, id: CacheTextureId, update: TextureCacheUpdate)
pub fn push_update(&mut self, id: CacheTextureId, update: TextureCacheUpdate)
Pushes an update operation onto the list.
sourcepub fn push_debug_clear(
&mut self,
id: CacheTextureId,
origin: DeviceIntPoint,
width: i32,
height: i32,
)
pub fn push_debug_clear( &mut self, id: CacheTextureId, origin: DeviceIntPoint, width: i32, height: i32, )
Sends a command to the Renderer to clear the portion of the shared region we just freed. Used when the texture cache debugger is enabled.
sourcepub fn push_alloc(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo)
pub fn push_alloc(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo)
Pushes an allocation operation onto the list.
sourcepub fn push_reset(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo)
pub fn push_reset(&mut self, id: CacheTextureId, info: TextureCacheAllocInfo)
Pushes a reallocation operation onto the list, potentially coalescing with previous operations.
sourcepub fn push_free(&mut self, id: CacheTextureId)
pub fn push_free(&mut self, id: CacheTextureId)
Pushes a free operation onto the list, potentially coalescing with previous operations.
sourcepub fn push_copy(
&mut self,
src_id: CacheTextureId,
src_rect: &DeviceIntRect,
dst_id: CacheTextureId,
dst_rect: &DeviceIntRect,
)
pub fn push_copy( &mut self, src_id: CacheTextureId, src_rect: &DeviceIntRect, dst_id: CacheTextureId, dst_rect: &DeviceIntRect, )
Push a copy operation from a texture to another.
The source and destination rectangles must have the same size. The copies are applied before every other operations in the texture update list.
fn debug_assert_coalesced(&self, id: CacheTextureId)
Trait Implementations§
source§impl Default for TextureUpdateList
impl Default for TextureUpdateList
source§fn default() -> TextureUpdateList
fn default() -> TextureUpdateList
Auto Trait Implementations§
impl Freeze for TextureUpdateList
impl RefUnwindSafe for TextureUpdateList
impl Send for TextureUpdateList
impl Sync for TextureUpdateList
impl Unpin for TextureUpdateList
impl UnwindSafe for TextureUpdateList
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
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>
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>
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