Struct webrender::prim_store::gradient::GradientGpuBlockBuilder
source · pub struct GradientGpuBlockBuilder {}
Implementations§
source§impl GradientGpuBlockBuilder
impl GradientGpuBlockBuilder
sourcefn fill_colors(
start_idx: usize,
end_idx: usize,
start_color: &PremultipliedColorF,
end_color: &PremultipliedColorF,
entries: &mut [GradientDataEntry; 130],
prev_step: &PremultipliedColorF,
) -> PremultipliedColorF
fn fill_colors( start_idx: usize, end_idx: usize, start_color: &PremultipliedColorF, end_color: &PremultipliedColorF, entries: &mut [GradientDataEntry; 130], prev_step: &PremultipliedColorF, ) -> PremultipliedColorF
Generate a color ramp filling the indices in [start_idx, end_idx) and interpolating from start_color to end_color.
sourcefn get_index(offset: f32) -> usize
fn get_index(offset: f32) -> usize
Compute an index into the gradient entry table based on a gradient stop offset. This function maps offsets from [0, 1] to indices in [GRADIENT_DATA_TABLE_BEGIN, GRADIENT_DATA_TABLE_END].
pub fn build( reverse_stops: bool, gpu_buffer_builder: &mut GpuBufferBuilderImpl<GpuBufferBlockF>, src_stops: &[GradientStop], ) -> GpuBufferAddress
Auto Trait Implementations§
impl Freeze for GradientGpuBlockBuilder
impl RefUnwindSafe for GradientGpuBlockBuilder
impl Send for GradientGpuBlockBuilder
impl Sync for GradientGpuBlockBuilder
impl Unpin for GradientGpuBlockBuilder
impl UnwindSafe for GradientGpuBlockBuilder
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