pub struct PrimitiveComparer<'a> {
prev: &'a CachedSurfaceDescriptor,
curr: &'a CachedSurfaceDescriptor,
resource_cache: &'a ResourceCache,
opacity_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<f32>>,
color_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<ColorU>>,
}Expand description
A helper struct to compare a primitive and all its sub-dependencies.
Fields§
§prev: &'a CachedSurfaceDescriptor§curr: &'a CachedSurfaceDescriptor§resource_cache: &'a ResourceCache§opacity_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<f32>>§color_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<ColorU>>Implementations§
Source§impl<'a> PrimitiveComparer<'a>
impl<'a> PrimitiveComparer<'a>
pub fn new( prev: &'a CachedSurfaceDescriptor, curr: &'a CachedSurfaceDescriptor, resource_cache: &'a ResourceCache, opacity_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<f32>>, color_bindings: &'a FastHashMap<PropertyBindingId, BindingInfo<ColorU>>, ) -> Self
Sourcepub fn compare_prim(
&mut self,
prev_desc: &PrimitiveDescriptor,
curr_desc: &PrimitiveDescriptor,
) -> PrimitiveCompareResult
pub fn compare_prim( &mut self, prev_desc: &PrimitiveDescriptor, curr_desc: &PrimitiveDescriptor, ) -> PrimitiveCompareResult
Compares two primitive descriptors using prim_uid + quantized raster-space vert corners. Transform changes are covered by vert corners; dynamic content changes (images, opacity/color bindings) are checked via the dep stream.
Auto Trait Implementations§
impl<'a> Freeze for PrimitiveComparer<'a>
impl<'a> !RefUnwindSafe for PrimitiveComparer<'a>
impl<'a> !Send for PrimitiveComparer<'a>
impl<'a> !Sync for PrimitiveComparer<'a>
impl<'a> Unpin for PrimitiveComparer<'a>
impl<'a> UnsafeUnpin for PrimitiveComparer<'a>
impl<'a> !UnwindSafe for PrimitiveComparer<'a>
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