pub struct ImageBorderScratch {
pub brush_segments_range: Range<BrushSegment>,
pub gpu_address: GpuBufferAddress,
}Expand description
Per-frame scratch data for an ImageBorder primitive.
Fields§
§brush_segments_range: Range<BrushSegment>Range into PrimitiveFrameScratch::segments holding the per-
frame nine-patch brush segments for this border. Built fresh
each frame against the prim’s current size in
prepare_prim_for_render.
gpu_address: GpuBufferAddressPer-instance GPU buffer address for the brush + segment blocks
written by ImageBorderData::update. Per-instance because the
block contents (stretch_size and segments) depend on the prim’s
per-instance size.
Implementations§
Source§impl ImageBorderScratch
impl ImageBorderScratch
Sourcepub fn build_for_prim(
data_handle: Handle<ImageBorder>,
prim_instance_index: PrimitiveInstanceIndex,
prim_size: LayoutSize,
data_stores: &DataStores,
scratch: &mut PrimitiveScratchBuffer,
)
pub fn build_for_prim( data_handle: Handle<ImageBorder>, prim_instance_index: PrimitiveInstanceIndex, prim_size: LayoutSize, data_stores: &DataStores, scratch: &mut PrimitiveScratchBuffer, )
Build the per-frame nine-patch brush segments for an ImageBorder
prim, push the resulting ImageBorderScratch entry, and wire it
up to the prim’s PrimitiveDrawHeader.kind_scratch.
Called from the prep early pass before update_clip_task runs,
since update_clip_task_for_brush reads the brush segments via
the scratch entry allocated here.
Trait Implementations§
Source§impl Clone for ImageBorderScratch
impl Clone for ImageBorderScratch
Source§fn clone(&self) -> ImageBorderScratch
fn clone(&self) -> ImageBorderScratch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImageBorderScratch
impl Debug for ImageBorderScratch
Source§impl Serialize for ImageBorderScratch
impl Serialize for ImageBorderScratch
impl Copy for ImageBorderScratch
Auto Trait Implementations§
impl Freeze for ImageBorderScratch
impl RefUnwindSafe for ImageBorderScratch
impl Send for ImageBorderScratch
impl Sync for ImageBorderScratch
impl Unpin for ImageBorderScratch
impl UnsafeUnpin for ImageBorderScratch
impl UnwindSafe for ImageBorderScratch
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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