Lines Matching defs:stop
221 static void add_stop_color(SkRasterPipeline_GradientCtx* ctx, size_t stop, SkPMColor4f Fs, SkPMColor4f Bs) {
222 (ctx->fs[0])[stop] = Fs.fR;
223 (ctx->fs[1])[stop] = Fs.fG;
224 (ctx->fs[2])[stop] = Fs.fB;
225 (ctx->fs[3])[stop] = Fs.fA;
227 (ctx->bs[0])[stop] = Bs.fR;
228 (ctx->bs[1])[stop] = Bs.fG;
229 (ctx->bs[2])[stop] = Bs.fB;
230 (ctx->bs[3])[stop] = Bs.fA;
233 static void add_const_color(SkRasterPipeline_GradientCtx* ctx, size_t stop, SkPMColor4f color) {
234 add_stop_color(ctx, stop, { 0, 0, 0, 0 }, color);
238 // the stop. Assume that the distance between stops is 1/gapCount.
240 SkRasterPipeline_GradientCtx* ctx, float gapCount, size_t stop, SkPMColor4f c_l, SkPMColor4f c_r) {
249 c_l.fR - Fs.fR*(stop/gapCount),
250 c_l.fG - Fs.fG*(stop/gapCount),
251 c_l.fB - Fs.fB*(stop/gapCount),
252 c_l.fA - Fs.fA*(stop/gapCount),
254 add_stop_color(ctx, stop, Fs, Bs);
257 // For each stop we calculate a bias B and a scale factor F, such that
260 SkRasterPipeline_GradientCtx* ctx, size_t stop, float t_l, float t_r, SkPMColor4f c_l, SkPMColor4f c_r) {
274 ctx->ts[stop] = t_l;
275 add_stop_color(ctx, stop, Fs, Bs);
327 // The two-stop case with stops at 0 and 1.
343 // Note: In order to handle clamps in search, the search assumes a stop conceptully placed
389 // N.B. lastStop is the index of the last stop, not one after.
488 // 2-stop gradients have colors at 0 and 1, and so must be evenly spaced.
505 // To handle clamps in search we add a conceptual stop at t=-inf, so we
516 // Here's our conceptual stop at t=-inf covering all t<=0, clamping to our first color.
527 // If t_lo == t_hi, we're on a hard stop, and transition immediately to the next color.
550 // Of note: we need to clamp t and skip over that conceptual -inf stop we made up.
553 // Starting ix at 0 bakes in our conceptual first stop at -inf.
556 for (float stop : stops) {
557 // ix += (t >= stop) ? +1 : 0 ~~>
558 // ix -= (t >= stop) ? -1 : 0
559 ix -= (t >= uniformF(stop));
977 // stop switching to the last color at p=1.